I have an MPD playlist. I'd like to find out what are URLs of media segments for next period.
The example is like this
<SegmentTemplate timescale="10000000" initialization="Video-$RepresentationID$-init.mp4" media="Video-$RepresentationID$-$Time$.mp4">
<SegmentTimeline>
<S t="2083838574453329" d="100053337" />
<S d="100053332" r="1" />
<S d="99839999" />
<S d="100053337" />
</SegmentTimeline>
</SegmentTemplate>
How calculate $Time$ variabel for each period of dash segment?
The DASH specification is freely available at https://www.iso.org/standard/79329.html and clearly documents how to determine the URL of any segment listed in the manifest.
Related
I am trying to achieve the same issue mentioned VoiceXML Record whole call, including menu options a nutshell, have VoiceXML Record whole call while also including menu options. I need to do this is PlumVoice and as per the suggestions need to look for a vendor extension if available.
I tried to look for the vendor extensions but didn't find it. I am fairly new to VoiceXML.Is anyone familiar if this is possible with PlumVoice(version 3.2.8)?
Basically merging these two blocks of code: where the user can say a menu option using voice mode but also recording the whole audio as a wav file.
Voice Menu Selection
<?xml version="1.0"?>
<vxml version="2.0">
<form id="mainmenu">
<field name="menuchoice">
<grammar type="application/x-jsgf" mode="voice">
one|two|three
</grammar>
<prompt>
For sales, say 1.
For tech support, say 2.
For company directory, say 3.
</prompt>
<filled>
<if cond="menuchoice=='one'">
Welcome to sales.
<elseif cond="menuchoice=='two'"/>
Welcome to tech support.
<elseif cond="menuchoice=='three'"/>
Welcome to the company directory.
</if>
</filled>
</field>
</form>
</vxml>
Recording audio input
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<record name="myrecording" type="audio/x-wav" beep="true">
<prompt>
Please record a message after the beep.
</prompt>
<filled>
You just recorded the following message:
<value expr="myrecording"/>
<submit next="submitrecording.php" namelist="myrecording"
method="post" enctype="multipart/form-data"/>
</filled>
</record>
</form>
</vxml>
Is this possible with a PlumVoice(version 3.2.8) vendor extension?
It is not a standard VoiceXML feature (out of the VoiceXML standard).
Only some VoiceXML interpreters like Voximal can do that by adding extra properties (property record utterance for example).
Please review this page.
The embedded video plays when the page is viewed on a mobile device but not when viewed on a computer (tested on two laptops running Windows 8 and 10, on Chrome, FF, and Edge).
This issue only exists with YouTube videos and the problem began 48 hours ago (approx.)
For example, see this YouTube URL (no video is being loaded):
http://www.youtube.com/v/RCsJHHUkisw&rel=0&color1=0x054b81&color2=0xe2e2e2&hd=1&showinfo=0&enablejsapi=1&playerapiid=ytplayer&fs=1
I have managed to handle this problem by rewriting the emvideo module.
I am currently using the module version = "6.x-1.26".
I didn’t take the time to change the entire module;
I changed only the parts I needed:
All the changes were made in this file:
\sites\all\modules\emfield\contrib\emvideo\providers\youtube.inc
In function theme_emvideo_youtube_flash line 444 I changed the line
$url = check_plain("http://www.youtube.com/v/$code&$related$autoplay_value$colors$border$high_quality$display_info$enablejsapi$fs");
to
$url = check_plain("https://www.youtube.com/embed/$code"); .
What I did was to look at the youtube embed code and try to make the link look the same.
Next step was to change the FLASH output, in line 566 function
theme_emvideo_youtube_default_external and change the next content:
<div id="$div_id">
<object type="application/x-shockwave-flash" height="$height" width="$width" data="$url" id="$id">
<param name="movie" value="$url" />
<param name="allowScriptAccess" value="sameDomain"/>
<param name="quality" value="best"/>
<param name="allowFullScreen" value="$fullscreen_value"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="scale" value="noScale"/>
<param name="salign" value="TL"/>
<param name="FlashVars" value="$flashvars" />
<param name="wmode" value="transparent" />
</object>
</div>
To
<div id="$url"><iframe width="$width" height="$width" src="$url" frameborder="0" allowfullscreen></iframe></div>
And that’s all…
Hope it helps a bit…
The following should be pretty close to a drop-in replacement for what's currently being served on the page referenced in the question (the object tag with id emvideo-youtube-flash-2):
<iframe id="ytplayer" type="text/html" width="590" height="499"
src="https://www.youtube.com/embed/Je2vE5RLJ6o?rel=1&showinfo=0&enablejsapi=1&fs=1&origin=http://www.islandcricket.lk/"
frameborder="0" allowfullscreen>
A few things about the implementation currently being served:
Using object tag and the embed URLs of the form youtube.com/v/video id (which only serves a Flash player, not HTML5) to embed YouTube videos has been deprecated for over a year.
the player parameter hd is deprecated. The iFrame player (used in the above code), will automatically chose the best quality to display based on a variety of parameters. If you wish to control this you can use the Javascript API.
the rel, showinfo, enablejsapi and fs parameters should continue to function as they have in the previous implementation (parameter documentaion here)
The allowScriptAcess parameter set to sameDomain in the current implementation is replaced by the origin parameter and should be set to the URL severing the webpage (documented here)
Screenshot of the above code working on islandcricket.lk tested via webdev tools:
I tried using linecontainsregexp within filterchain ant-task by framing regexp pattern holding unique server name say 'act1' & now property holds value like this:
<Server name="act1" value="ServerName" port="1234"></Server>
How to get individual attribute names?. For eg if I want to get port #, how to retrieve it. I tried with something like:
<propertyregex property="extracted.prop" input="${server.details}"
regexp="(.*)\\ *##" select="\1" />
thank you.
The code below should work to extract each of the three attributes. First, notice that I'm loading the entire xml file. It isn't necessary to extract the specific line as you were doing. Secondly, I wrote it to be flexible enough to allow line breaks in the Server properties and to allow any order of the attributes.
I see that you were really struggling with the regex in particular. For your understanding, I'll break down the first regex:
(?s) // DOTALL flag. Causes the . wildcard to match newlines.
\x3c // The < character. For reasons I don't understand, `propertyregex` doesn't allow <
Server // Match 'Server' literally
.*? // Reluctantly consume characters until...
name= // 'name=' is reached
" // Because ant is an XML file, we must use this escape sequence for "
(.*?) // Reluctantly grab all characters in a capturing group until...
" // another double quote is reached.
And finally the XML:
<loadfile property="server.details" srcfile="${baseDir}/build/myTest.xml"/>
<propertyregex property="server.name"
input="${server.details}"
regexp="(?s)\x3cServer.*?name="(.*?)""
select="\1" />
<propertyregex property="server.value"
input="${server.details}"
regexp="(?s)\x3cServer.*?value="(.*?)""
select="\1" />
<propertyregex property="server.port"
input="${server.details}"
regexp="(?s)\x3cServer.*?port="(.*?)""
select="\1" />
Let's take this simple HTML:
<html>
<body>
<!-- Object Tag For the Audio Player -->
<object id="mpAudio" width="100%" height="100%"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject" align="middle">
<param name="URL" value="http://servername/media/Alt.TÉst/default.wav" />
<param name="AutoStart" value="True" />
<param name="UIMode" value="Full" />
<param name="EnableContextMenu" value="True" />
<param name="WindowlessVideo" value="True" />
<param name="Mute" value="False" />
</object>
</html>
Notice in the URL there is this unicode character: É
When I open that html file, the audio plays as a garbled mess. Of note, in some older VM I have (for random IE6 testing), which has an O/S of 2003 Standard Edition, an IE 6 browser, and Windows Media Player 6.4.09.1130 .. it works, fine! My testing where it's a garbled mess, involves Windows 7, IE 10, and WMP 12.0.7601.17514
I thought the solution may be % encoding the URL. That's even worse. The encode became: http%3A%2F%2Fservername%2Fmedia%2FAlt.T%C3%89st%2Fdefault.wav
And I went from at least being able to play a garbled mess, to not playing anything at all.
One other test:
Taking the non-encoded url and putting it in Firefox, opens the wav (so Firefox is OK with the unicode character). Taking the encoded url, I get "server not found". I guess I don't know how to encode!
Barring eliminating unicode for data entry (these URLs are generated from Username's, where in some locales they allow unicode characters in the name), how do I make this work?
Thanks.
I thought the solution may be % encoding the URL. That's even worse. The encode became: http%3A%2F%2Fservername%2Fmedia%2FAlt.T%C3%89st%2Fdefault.wav
The solution should be to URL-encode path components, rather than the whole URL. You want to end up with:
http://servername/media/Alt.T%C3%89st/default.wav
Although, I would have expected the fail case to get a 404 and just not play anything—garbled audio is a weird result. There might be a different issue as well?
I have a property defined in one of my property files:
<entry key="build" default="0" type="int" operation="+" value="1" />
I read this property using:
<replacefilter token="#build#" property="build_num" />
Once this number gets bigger than 999, thousand separator commas start appearing, like this:
1,001
1,562
Is there a way to get rid of those commas?
(I use build to generate a file name, and don't really want to see any commas in there).
You can prevent thousand separators from being used by adding a pattern to the entry:
<entry key="build" default="0" type="int" operation="+" value="1" pattern="0" />
Note that you'll probably need to manually remove the commas one-time before running this - else your build numbers will reset, with the comma and subsequent digits being discarded. (So 1,325 -> 2 and 4,111 -> 5 and so on.)
Figured ###0 would have worked, but it didn't. Since the project is already making extensive use of ant-contrib, it wasn't difficult to add the regex solution Aaron suggested.
<propertyregex property="build" input="${build}" regexp="," replace="" global="true" override="true"/>