Brightcove SmartPlayer API Controlling Volume - javascript

I am using Brightcove custom player, it has only videoDisplay ( not video control ). In JavaScript i am creating all media control like ( play/ pause, Seek bar, volume , fullscreen).
I am able to play, pause, seek video via smartplayer API. But i didn't find a method to mute / unMute or adjusting volume.
From Brightcove support website i found a article to control volume via JS
http://support.brightcove.com/en/video-cloud/solutions/controlling-volume-player-api
setVolume method throws undefined error
But i don't find a method video.setVolume() in VideoPlayer API
http://docs.brightcove.com/en/video-cloud/smart-player-api/reference/symbols/brightcove.api.modules.VideoPlayerModule.html
Help me controlling volume via JavaScript
Thanks

I'm trying to figure this out to - I need a video to auto-play (its going to be used in an ad unit) and have it be muted by default.
From the link you provided, see the following note:
Note: Volume control has not been included in the Smart Player API.
iOS devices do not allow for control of the volume outside the
built-in system controls (i.e. cannot be done via Javascript).
Controlling the volume programmatically in any HTML player is
currently not possible.
I'm thinking the solution might be to use the Flash Player API where it is supported with auto play and mute, and then fall back to the Smart Player API without auto-play everywhere else.
I'm also looking into video.js as an alternative - but if the note from the BC knowledge base is correct, thats not going to work.

Related

How does youtube volume controls work internally?

I'm curious how Youtube allows you to control the speaker volume through embedded controls in their website? Can Javascript control the speaker output? Thanks in advance.
Ok, so yes, for <video> and <audio> elements JavaScript can control the volume of "playback".
That does not mean JavaScript in the browser is controlling your speakers, directly, it is more like your browser can send audio to your systems speakers... And your browser let's JavaScript signal certain intents, which are forwarded by your browser to the system and then to the speakers.
But if your speakers are set to a low volume, or are off, your JavaScript could not change that.
You can learn about the details on MDN here https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video and here https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Introduction
You can assign the volume property of the audio or video element to set the output volume.

Flash fallback for jplayer won't work in chrome because "Invisible [Flash] content is always blocked."

So I have to use the Flash fallback for Jplayer when the user is using Google Chrome because of the way our audio streaming server is set up (HTML5 just doesn't play nicely with our Streaming Audio Icecast server for some reason, live streams are fine but static mp3s are not). All other browsers are fine!
However, it keeps blocking the player even if the site is selected to always play the flash plugin, and now it's printing this error in the console: "Same-origin plugin content from http://kansaspublicradio.org/widgets/audio-popup/jplayer/Jplayer.swf must have a visible size larger than 6 x 6 pixels, or it will be blocked. Invisible content is always blocked."
What's the best/easiest way to make the Flash player not be invisible?
Jplayer uses HTML elements for the controls. It's not like your typical Flash game or animation or anything, the Flash part is just used to play audio (when HTML5 isn't being uses).
Thanks for any help! I'm also aware that Flash is going away in a few years, hopefully we have a more ideal solution figured out by then.
Open jquery.jplayer.js or jquery.jplayer.min.js and find setAttribute("width". Here you can adjust the width and height of the loaded player. Setting this to something above 6x6 should fix your issue.
Unfortunately the official jPlayer project is no longer maintained and pull requests are ignored, so you'll have to do this manually.

Is there any VPAID client?

Scenario: Need to play VPAID ads with "In Content" mode, on mobile
Most of the solution I found is either some other players plugin (like videojs) or doesn't support mobile (like google ima)
Or, something like this:
https://github.com/dailymotion/vast-client-js
Not sure what you mean with in-content, but I assume that you're looking for a video player that supports VPAID. After all, VPAID does just that, it allows you to create interactive content (e.g. an HTML canvas) that shows within your video ad or even interacts with the video player itself (e.g. pauses the publisher video).
IMA is a perfect plugin for a video player like Video.js and it does support mobile -JavaScript VPAID creatives- (what makes you think that it doesn't?) Hopefully I'll be able to help you further if I know what you're looking for.

Javascript on embedded videos

Is it possible to use javascript to seek position of videos embedded on a page (Videos from Youtube, DailyMotion, Revver, etc)?
If you mean you want to read the position of progressbar of the video player it could be done, but the player (usually flash object) has to expose appropriate methods or events to javascript. The exact way of intercating with player depends on the specyfic flash object you use.
YouTube has a javascript API which can be used to control the video playback, including seeking the position

Is there any way to control EMBED Code Videos?

Is there any way to control YouTube EMBED CODE. For example I am using YouTube embed code in my site. Is there any way to control the video like forward, backward, stop etc. with my own buttons.
Is this possible?
Any help will be appreciated.. Thanks in Advance.
Fero
YouTube has a JavaScript and Flash API that you can use to build your own player or control the player programmatically.
The documentation is here: http://code.google.com/apis/youtube/overview.html
There are several examples in the documentation for controlling your own "chromeless" player. This is probably what you want to use if you want your own buttons.
All of the major browser-embedded video player types have ways to do this, but the method is different for all of them.
YouTube uses a Flash player, which poses a special problem: Flash video players have no ability to handle external JavaScript calls other than what is specifically added by the programmer that built the player. That is, if YouTube didn't build their player with support for external scriptability, you can't script it. This isn't a flag -- on/off -- it's that Flash makes you explicitly publish an external scripting API, and you have to know what the calls look like to make the player do what you want. This is unlike, say, QuickTime, Windows Media Player, or the new HTML 5 <video> tag, all of which have documented basic playback control like you're asking about.
It's probably possible to build your own FLV player (or buy one, like the popular JW Player, which does have a JavaScript API) and point it at the actual video file served by YouTube. I don't know if they try to obscure the video file URL, but once you find out what it is, you're golden.

Categories

Resources