I'm implementing videos into my website which are hosted on brightcove. On some examples of initializing the video I see videojs(document.getElementById('my-video')) and on others I see bc(document.getElementById('my-video')).
I see on brightcove's documentations they mention bc() vs videojs() but I don't understand what they are saying.
Can anyone help me understand what the difference is?
The Brightcove Player is an extension of Video.js. Use bc(id) to initialise a Brightcove Player. Using videojs(id) to initialise would result in missing some Brightcove-specific customisations which are needed to work with Brightcove Video Cloud.
The confusion arises because videojs(id) can also be used as a getter to get an already initialised player, but you want to make sure you don't call that before the Brightcove Player is initialised. Using videojs.getPlayer(id) is safer, as it won't initialise an uninitialised player. This was added in Video.js 6.7.0 / Brightcove Player 6.16.0.
use bc(id) to initialise a Brightcove Player
use videojs(id) to initialise regular Video.js
use videojs.getPlayer(id) to get an initialised player
Related
Is it possible for VideoJS to show/hide the playlist when in fullscreen? I've looked for examples online including even with the VideoJS based Brightcove's player and not found any so far. An example of the Playlist UI is: https://videojs.com/advanced/
I am looking to migrate from the MediaElementJS player which does support toggling the playlist from fullscreen, to VideoJS if i can get its playlist behaving in a similar manner. Exiting fullscreen to use the playlist is not acceptable.
If this functionality isn't currently supported, does anyone know any way around this issue? Perhaps an iframe based solution to keep the player fullscreen while accessing the playlist?
I'm not a web dev so please provide detailed info and/or full code examples rather than snippets. I'm getting there gradually.
Thanks!
Can I use other player (maybe override existing?) in TVJS ?
I following this tutorial:
http://www.raywenderlich.com/114886/beginning-tvos-development-with-tvml-tutorial
and I want to play other media stream(rtmp etc..).
Normally I can use VLCKit, but can I use it with app based on TVML?
Thanks for help;)
This is absolutely possible, as you can bridge between JavaScript and native code.
There is a WWDC session video about that: https://developer.apple.com/videos/play/wwdc2013-615/
Basically, it should be mainly a matter of passing the URLs you want to play from your JS to VLCKit's ObjC bindings.
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 have few links to .mp4 video files like
file1.mp4
file2.mp4
file3.mp4
I need to play them all in player as one file. Actually not necessarily "as one" file, the player must act like it's one file. My best guess is to create custom controls and playback area for MPMoviePlayerController and divide the playback by time slices.
For instance
file1.mp4 file2.mp4 file3.mp4
-----------|------------|------------
Is this a good approach? Can this be done anyhow easier?
Also, the server, from which I'll get the videos is not customizable and I can't convert videos to MPEG-2 and stream them via .m3u8 files.
Thanks in advance
I guess you can use AVQueuePlayer. It supports multi-item playback. Haven't tried that myself (I used AVPlayer for single-item playback). I believe that AVQueuePlayer usage should reduce your overall efforts. ( You will still be responsible for drawing playback controls )
I sticked up to the scenario I described in the question and was able to create the player component.
I want to play a remote video hosted in Brightcove. As Brightcove URLs are links to players not direct links to video files the AVPlayer won't do it.
I know Brightcove provides an API but can't find any good examples for iOS nor documentation.
Any help/pointing direction appreciated.
I haven't used Brightcove, but poking around their site, I see they have two APIs: a Player API and a Media API. It sounds like the Media API is what you want — it's documented as giving direct references to the videos. The page has a link to several examples.
You can also lift alot of the code from their Oneplanet demo source. In fact the whole playlist and video player mechanism can be practically copied into your project so all you need to do is pass a video or playlist ID into their initwithnibandplaylist function in their view controller and you're good to go.
I hope this helps your question. There is a renditions which contain direct video link.
Here is a link for api link.
http://support.brightcove.com/en/video-cloud/docs/accessing-video-content-media-api
renditions is a javascript object containing multiple video links based on resolutions such as 360,460, 720.
You can find the direct link to the video via the media api, bypassing the player API entirely. You need a pro account and a token:
http://support.brightcove.com/en/docs/getting-started-media-api
Alternatively, you can create a simple "player" without any controls (just a video window actually) and make your own HTML controls totally outside of Brightcove to trigger almost anything you'd want to do via the player API.
There is also a Brightcove iOS SDK. It is really two SDKs one for the Media API and one that includes a MediaPlayer. If you want to use the AVPlayer you can use the Media API iOS SDK. Here is the docs for that:
http://docs.brightcove.com/en/video-cloud/mobile-sdks/brightcove-player-sdk-for-ios