how can I add subtitles using shaka-player from a .mpd file? - streaming

I'm using the shaka player with the below build.
https://ajax.googleapis.com/ajax/libs/shaka-player/3.0.8/shaka-player.compiled.js
I'm using a .mpd file and it has a subtitle file.
<AdaptationSet contentType="text" mimeType="text/vtt" lang="en" group="3" label="English">
<Label>English</Label>
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle" />
<Representation bandwidth="1732" id="7">
<BaseURL>cmaf/subtitle-en.vtt</BaseURL>
</Representation>
</AdaptationSet>
I want to display the subtitles in my video player. How can I configure the player to identify the subtitles.

with ,
player.setTextTrackVisibility(true);
We can display subtitles of one language.

Related

AEM6.5 cannot user path for selecting video in video component

We would like the editors to be able to use the path selector as well as drag and drop when they select an MP4 file for the video component. At the moment only the drag and drop for video file works. That means, only when you drag and drop an MP4 file from Assets will this be taken into account for the video component. For the image component one can drag an drop an image from Assets or select it using the path.
I am attaching the video component _cq_diaglog/.content.xml
<file jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
name="./videoFile"
fieldLabel="Video"
fileNameParameter="./videoFileName"
fileReferenceParameter="./videoFileReference"
title="MP4-Video"
mimeTypes="[video/mp4]"
uploadUrl="${suffix.path}"
allowUpload="{Boolean}${not empty cqDesign.allowUpload ? cqDesign.allowUpload : false}"
autoStart="{Boolean}false"
multiple="{Boolean}false"
required="{Boolean}true"
useHTML5="{Boolean}true"
class="cq-droptarget"/>
as well as the video component _cq_editConfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:EditConfig">
<cq:dropTargets jcr:primaryType="cq:DropTargetConfig">
<video
jcr:primaryType="nt:unstructured"
accept="[video/mp4]"
groups="[media]"
propertyName="./videoFileReference"/>
</cq:dropTargets>
</jcr:root>
I am also attaching two screenhost pictures from the editor where we would like the editors to be able to select a video by browsing the path:
It turned out the Videos in DAM did not have thumbnails under Renditions. After adding thumbnail renditions for a video one can add it using the Path selector. Everything was ok with code and configuration just content was missing.

how run standard and video line item in same ad unit

We have a 300 by 250 on the right rail of our site and we have about 5 customers ad rotating (jpg, gif and swf), but one of our customer would like to upload a advertisement video ad I am not sure how to set this up in google double click. Can any one please help.
Many Thanks =)
You can create Custom creative. Then insert something like this :
<a href="%%CLICK_URL_UNESC%%%%DEST_URL%%" target="_blank">
<video autoplay loop>
<source src="INSERT VIDEO URL" type="video/mp4" />
</video>
</a>
You can also upload video to dfp (there is a size limit) and use file macro.

Can not get videos to play on ipad or iPhone?

I have looked everywhere to an answer to this, and it is all very confusing.
I can not get my videos to play on either an ipad or iphone.
They play on other devices including androids/desktops. I have converted them many times using Miro video converter and handbrake, I have tried reducing the file size. I have tried removing the poster tags. I have come to the conclusion there must be something wrong with my html, which look like this:
<div id="blackbox_2" style="display: none">
<video title="BlackBox Sessions Part 2" class="video" preload="auto" controls>
<source src="videos/BlackBoxPt.2 copy.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="videos/BlackBoxPt.2.webm" type='video/webm; codecs="vp8, vorbis"'>
<source src="videos/BlackBoxPt.2.ogv" type='video/ogg; codecs="theora, vorbis"'>
<object width="640" height="360" type="application/x-shockwave-flash"
data="flowplayer-5">
<param name="movie" value="flowplayer-5" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"clip": {"url": "http://kimcolemanprojects.com/videos/BlackBoxPt.2.appleuniversal.mp4", "autoPlay":false, "autoBuffering":true}}' />
</object>
</video> </div>
This html I got from dive into html. On the iPad/iphone you can see the video play button in the middle, however when you click on it nothing happens.
The page with the videos is here http://kimcolemanprojects.com/video-lighting.html
I have several videos on this page that are display in a fancy box.
If anybody can help guide me in the right direction I would be very grateful, this problem I'am finding very irritating.
Thanks
Angela
I decided the easiest option to this problem was to stream all my videos through youtube and vimeo. That way they work on everything.

iPhone-friendly browser audio play button

The old way to allow audio to be played/streamed in the browser was a flash button, such as that seen on www.irish-sayings.com .
What's the new iPhone-friendly way to give the ability to click on a simple button to listen to an audio file in the browser?
If the answer is HTML5, is the such a button built and available? I don't need an MP3 player with steaming and such, only a button.
You just need to use the audio tag.
<audio controls="controls">
<source src="song.mp3" />
<!-- You can include some fallback for browsers that do not support this -->
</audio>

html5 video not playing in ipad simulator?

I created xcode universal project, I am trying to load HTML5 page in UIWebView the
problem is i cant see any control to play movie, and i am getting blank screen on the video
place, in ipad and iphone simulator,
my .html file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Change this if you want to allow scaling -->
<meta name="viewport"
content="width=default-width; user-scalable=no" />
 
<meta http-equiv="Content-type"
content="text/html; charset=utf-8">
 
<title>Web App Demo</title>
 
</head>
<body>
<h1>Video Test</h1>
<p>This is a video test.</p>
<video width="320" height="240" controls= "controls">
<source src="video.ogv" type="video/ogg" />
<source src="video.mp4" type="video/mp4"/>
browser not supports the video
</video>
</br> <br/>
<h1>This is Audio </h1>
<b>Testing Audio </b>
<audio controls="controls">
<source src="audio.ogg" type="audio/ogg" />
<source src="audio.mp3" type="audio/mpeg"/>
browser not supporting audio
</audio>
</body>
</html>
Any help why its not playing in simulator.
Thanks in advance.
I have seen this before when there are url issues -- like capitalization... The simulator is more relaxed than the device... Check the exact file names...
Sounds like it might be a pathing issue. You are using relative pathnames for the video, so they need to be in the place the HTML expects them to be in order to find them. You'll need to either use absolute pathnames to the files in your bundle OR make sure that the base href is defined to point to the appropriate folder holding those images, either explicitly in the HTML or by specifying the correct baseref in the loadHTMLString:baseURL: call.
One way to quickly test whether this is a problem would be to put a .png next to the video files and reference it in the HTML, too. If the .png doesn't show up, it's not a video problem so much as a problem finding assets.
i read that the mp4 file should be placed before the ogv file for the iPad to play it.
I am playing an m4v file in my uiwebview, but the translucent 'play' button does not appear in my simulator. It does work on the device itself, though....
<video id="VideoDiv" preload src="http://www.movietime.com/movie.m4v" controls width="480px" height="270" poster="poster.png"></video>