Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use HTMLMediaElement or equivalent object without a document? #2981

Open
guest271314 opened this issue Aug 30, 2017 · 0 comments

Comments

@guest271314
Copy link
Contributor

commented Aug 30, 2017

Use cases include requesting, processing or editing media in a context other than the current document.

For example, if we want to request N media files and record the playback of specific time ranges of the media files, then create a single file containing each previously recorded time ranges. Currently the procedure one approach could include using HTMLMediaElement, MediaSource for streaming the media fragments and MediaRecorder to record the MediaStream of the media playback.

As such, presently we would need to play each video within the context of the current document, generally, though not necessarily, in sequence, requiring T time, where T is the combined total duration of each media fragment. Ideally, we should be able to play N media files at the same time, in a context of the browser other than the current document, since we do not need to render the media playback visually at <video> element or audibly at <audio> element to record the specified media fragments, perhaps similar to the functionality of OfflineAudioContext. Our interest would be in the resulting concatenated media file containing all of the recorded media fragments.

While <video> and <audio> are HTML elements, we only need the request and processing functionality of the elements, not the visual or audio rendering output capabilities for the current requirement, to record the media fragment, process the resulting .webm or other file type as Blob to set proper metadata as to the duration of the recorded MediaStream, then render the media at, e.g., MediaSource, to again record the fragments as a single media resource.

The expected result is to reduce the total time to achieve the result to the greatest duration of the N media fragments being recorded, instead of T.

Related #2824.

@guest271314 guest271314 changed the title Can we expose HTMLMediaElement or equivalent object in DedicatedWorkerGlobalScope and SharedWorkerGlobalScope? Can we use HTMLMediaElement or equivalent object without a document? Aug 30, 2017

@annevk annevk added the topic: media label Sep 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.