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

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.

Related

How to Stop HLS.js Video Preloading?

I have tried adding the preload attribute with a value of none to the video tag but it doesn’t stop the hls.js Library from preloading from the video.
How can one stop preloading of hls.js videos?
If you do not want to preload the video, do the following:
add autoStartLoad with a value of false when creating the HLS config like this: new Hls({ autoStartLoad: false })
Add a play event listener to the native HTML video element, call hls.startLoad(), and then remove that event listener to avoid calling startLoad multiple times since it only needs to be called once
For browsers that play hls videos natively, you can just add the preload attribute with a value of false to the native HTML video element

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.

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?
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.

JSF play video file

I want to play a video file from my web app. I use JSF. I want to know how we can open the video file with the help of any video player installed in the client's system. I know how to open a pdf file the same way. But I want to know how to open a video file.
There's no standard JSF component for this. It's however not different from as you would do in plain HTML. Just drop the video file in public webcontent (so that it's reachable by an URL) and use the HTML <embed> and/or the <object> element which points to the URL of the video file. That's basically all. Note that you can just use EL in template text. So e.g. <embed src="#{bean.videoURL}"> would work perfectly fine, as long as it generates the HTML code the way you intend (open page in browser, rightclick and View Source to see it).
The way how to create and parameterize the HTML <embed> or <object> tag in turn depends on the video format (MPEG, MOV, FLV, etc). You basically need to consult the documentation of the video format vendor for details how to use it. Since you didn't mention what format the video file is in, we can't help you further in detail. Googling the smart way should however yield sufficient examples. E.g. "embed mpeg in html".
PrimeFaces has however a <p:media> component which makes it all easier for developers who are lazy in Googling for examples and/or figuring the browser specific inconsitenties ;) It'll outright generate the right HTML code necessary for the provided video format.
See also:
How to stream audio/video files such as MP3, MP4, AVI, etc using a Servlet
This works in browsers those support HTML5.
<video controls="controls">
<source src="resources/myVideo.mp4" type="video/mp4"/>
</video>

Flv Decoder in J2ME for playing Youtube videos

I am looking for playing flv files using J2ME. Is there any possibility for doing so? Is there any other way to play youtube videos through J2ME?
Extract the v parameter from an youTube url, lets call it VIDEO_ID.
Open http://gdata.youtube.com/feeds/mobile/videos/VIDEO_ID. The content is in xml format.
Parse the xml to find media:content tags.
Open the url attribute of a media:content tag with Manager.createPlayer(url). The protocol is rtsp.

Resources