How to make your own simple MPEG DASH player? - mpeg-dash

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?

Take a look at Building a simple MPEG-DASH streaming player:
Like described on this site following this steps should give you an idea:
Define an HTML5 video element in the HTML section of a page.
Create a MediaSource object in JavaScript.
Create a virtual URL using createObjectURL with the MediaSource object as the source.
Assign the virtual URL to the video element's src property.
Create a SourceBuffer using addSourceBuffer, with the mime type of the video you're adding.
Get the video initialization segment from the media file online and add it to the SourceBuffer with appendBuffer.
Get the segments of video data from the media file, append them to the SourceBuffer with appendBuffer.
Call the play method on the video element.
Repeat step 7 until done.
Clean up.

Related

Adding params on mp3 audio for shortcode [audio] in Wordpress

Using the shortcode audio in Wordrepss [audio src="some-file.mp3"] (this one returns an audio player),
I'm trying to add some params after the file extension: [audio src="some-file.mp3?param1=some-value&param2=somo-value-two"] etc, but I can see that the shortcode do not retuns the player, this one returns an link to the audio.
Were you able to achieve this somehow?
Thanks.

What is the exoplayer2 equivalent for Hls.Events.FRAG_LOADED event present in hlsJs library

We have used hlsJs library (ref: https://github.com/video-dev/hls.js) in Chrome browser to play HLS files.
There we have an event called Hls.Events.FRAG_LOADED which provides information about the hls fragment loaded like sequence number, start and end PTS and any custom tag attached to the fragment (ref: https://github.com/video-dev/hls.js/blob/master/docs/API.md#FRAG_LOADED)
Is there an equivalent event or api which we can listen to in ExoPlayerv2 for Android which can provide me same information about the media segment loaded?
Why I need this?
In my streaming server I am putting some custom EXT tag for each media fragment & i want to read that data when a media fragment is loaded in my player.
This is what I get from hlsJs on chrome browser for FRAG_LOADED event.
Need similar data from exoplayer
Any pointer will be helpful.
Thanks in advance.
You could try looking into the AdaptiveMediaSourceEventListener onLoadComplete method and use the DataSpec object to get both URL and Format objects which can be used to extract some data like bitrate and position of the segments. I do not know if there is an equivalent API out there for what you are looking for.

Play and download audio file on the same page in Drupal

First of all i work with Drupal 7.
I have a custom content type which allows me to upload an audio file.
I found a way to play the audio file when the user access a page of this content type.
Now i want to let the user download the audio file, but not remove the play capabilities. I want to add a download button on the same page (details page of the content type).
Can someone explain me how to do it ? I've got nowhere on this matter.
There are many ways to achieve this, depending on your drupal expertise. If you are using node templates, then you can print the same variable twice, once inside the music player plug in, and once with a download button. Something like this:
...... prints other fields .....
<my-audio-player src="<?php print $node->field_my_audio_field;?>"/>
Click to download
...... prints other fields .....
To force the download instead of opening, check this: Force browsers to download a file rather than open
To achieve this without writing any code or templates, you can do what Fleix Eve have suggested above. Set the display settings as direct download. Then create a block view which shows your audio file field, take the argument from URL. Then set tat block to display on node-view.

Using existing media element instead of createMediaElement

Is there an example of using an existing video element to attach the media streams rather than creating a new one with event.stream.createMediaElement()? I presume that's possible.
Thanks.
You cannot use an existing video or audio element (i.e. one that you created outside of vline) since the element returned from createMediaElement is tied to the stream inside the browser. What you can do is have a div where you want to display the video, and replace the media element inside the div.

Extract image frame from video in c#

I trying to create media player in window form application us C#. I want to get thumbnails of video file in order to show them in the playing list, Can any body help me to figure out the code or refer me some links. i am really stuck at this point

Resources