Cikin1
Cikin1

Reputation: 41

How to make your own simple MPEG DASH player?

I was wondering if someone had already tried to make his own simple DASH player(and maybe has some examples/source codes) but without using dash.js repository on GITHUB , and if possible has any insights and tips on how to start with the creation/writing process?

Upvotes: 0

Views: 2964

Answers (1)

Dimitri Podborski
Dimitri Podborski

Reputation: 3774

Take a look at Building a simple MPEG-DASH streaming player:

Like described on this site following this steps should give you an idea:

  1. Define an HTML5 video element in the HTML section of a page.
  2. Create a MediaSource object in JavaScript.
  3. Create a virtual URL using createObjectURL with the MediaSource object as the source.
  4. Assign the virtual URL to the video element's src property.
  5. Create a SourceBuffer using addSourceBuffer, with the mime type of the video you're adding.
  6. Get the video initialization segment from the media file online and add it to the SourceBuffer with appendBuffer.
  7. Get the segments of video data from the media file, append them to the SourceBuffer with appendBuffer.
  8. Call the play method on the video element.
  9. Repeat step 7 until done.
  10. Clean up.

Upvotes: 4

Related Questions