I'm using video.js for my html5 video, but on older devices (such as BlackBerry OS4), neither the html5 or the Flash fallback work.
Is there any way to detect this - some sort of onError callback within videojs itself, or any other way that I can detect if the video isn't supported?
I've found this code, which works for older BB, but then also detects older IE, which would run hapily with the Flash fallback.
function supportsVideo() {
return !!document.createElement('video').canPlayType;
}
Any help or pointers would be appreciated.
Related
I want to display ads with VAST ad tag and with a HTML5 player. I'm currently trying to use videoJS with Vast Ads Plugin and I'm noticing I can't get the videoJS player to work without having a video content (video element with a src attribute for the video content).
Does anyone know a simple way to use a video player for just ads from VAST, and without video content? Google IMA3 SDK allows that, but I'm now looking for video plugins to cover IE use case (which Google IMA3 SDK does not cover).
Thank you!
There is a dirty way to do this. You can get the ad video url from the plugin that already parsed by it. Then just paste as src to video tag.
If the player you are using support only running pre-roll, that's obviously the best choice. Since that's likely not the case, I would recommend creating a small 1 second long black video MP4 and setting it as the content, with all video controls disabled. This was the lowest friction solution for me, as I didn't need to ask the player anything special of the player. The pre-roll plays, and the user briefly sees black at the end, which may not really be noticed.
I'm relatively new to VideoJS; I've used it successfully in all browsers EXCEPT ie < 9. I've seen a few threads started and kind of answered RE the Flash fallback for IE 8 and earlier.
My issue is that I can't get the Flash fallback working at all. I'm using the CDN version of VideoJS and assuming that I don't need to upload anything or make any other changes to my code other than what is outlined on the VideoJS demo page.
In IE 7 and 8 I get nothing. I don't get a SWF dynamically embedded; when I check my log and do some debugging via the console I can still see the tag; I am assuming that I should be seeing a dynamically generated and embedded .swf file for the fallback.
I've seen in a couple of threads that the latest release of VideoJS is broken / Flash fallback is not working. I've also tried a few of the workarounds outlined on the various boards - nothing at all is working for me.
Is anyone else having this issue / have you managed to resolve it? the v("path_to_swf") fix is not working... absolute paths are not working... preload="none" is not working...
Any help is greatly appreciated!
Thanks!
Without sample code, I have no idea if this will help, but IE will not initialise embedded Flash objects that have the style: visibility: hidden; (including any parents of that object). You can probably see the Flash object be requested by looking at the network traffic, but it won't fire any of the Video.js events until visibility is set to visible.
IE9 will use the HTML5 player, and IE7/8 will fallback to the Flash player (which is why the problem can't be observed in IE9, unless the techOrder has been changed to list flash first).
I want to abandon the HTML5 video tag for a 8MB MP4 file I want to play on a webpage because it has been doing strange things on Chrome on Windows 7/8 but not on Chrome <=Vista. Strange as in:
Not loading it sometimes
Most of the time but not always vertically squashing the video content 70%
Flickering wildly
This has been duplicated on a number of different machines we have tested on.
Is there some markup I could use to force an MP4 to be played by Flash only?
TIA
Mark
You can make the player use Flash using the techOrder parameter.
<video ... data-setup='{"techOrder": ["flash"]}' ... />
https://github.com/videojs/video.js/blob/master/docs/guides/tech.md
If you want to give the priprity to flash player first go to the video.js or video.min.js file and replace the ["HTML5"],["flash"] with ["flash"],["HTML5"]
Try to replace
vjs.options = {
// Default order of fallback technology
'techOrder': ['html5','flash'],
with
vjs.options = {
// Default order of fallback technology
'techOrder': ['flash','html5'],
in video.js. The script will now give flash the priority to run, rather then html5
I'm setting up video.js and would like to use a single video encoding format (H264) in order to save space (it would save over 50% in my case). video.js falls back to a flash player when HTML5 video isn't possible, but I'd like it to also fall back when H264 support isn't present too (in Firefox, for example). Is there some way to make this happen?
You could try detecting support for that format directly if you needed to - although I agree, it should fallback to Flash automatically.
http://diveintohtml5.info/detect.html#video-formats gives an example of detecting support for h264
You don't need to do anything. That is what will happen.
It works here, for example. Do you have a URL where it's not working for you?
I am planning to build a system to broadcast public events (trials, meetings, conferences).
A key request will be the insertion of live subtitles to the A/V stream.
The subtitles will be "live" since they will be produced by an operator while the event will happen.
I suppose the HTML5 "track" element is not yet implemented by any of the major browsers, but: can I expect to eventually use it for live subtitles? Will I be able to inject the subtitle to the page while the stream is playing?
Please Look at the following links. Looking at the link i am having to believe it should be possible as they are using Js to show subtitles
http://www.storiesinflight.com/js_videosub/
http://cuepoint.org/
You may also consider http://mozillapopcorn.org/ which is to show content on timing of the video. So technically u can use this with ajax to show/stream subtitles
There are HTML5 video JS libs that support subtitles (eg: VideoJS supports the .srt format, there are several easily Google-able others), however to the best of my knowledge none of them support streaming subtitles.
I think you may have to build your own solution for this. If I were to do it, I'd probably try doing something with Socket.IO's broadcast functionality that can push data out to all connected clients at once, and have your client-side JS listen for new subtitle events and render them on screen as they come in. You can use plain ol' CSS to overlay the text over the HTML5 video.