Last week Ooyala announced a new player, version 3, simply called "Player". Here's the announcement: videomind.ooyala.com/news/ooyala-launches-enhanced-html5-video-player-targets-mobile-devices
TL;DR: Benefits include HTML5 support on devices other than iOS (a limitation the Legacy player has) and much nicer customization options.
Legacy embed codes all still work, so existing players embedded on your site won't break. Creating a V3 embed is fairly easy:
<script src="http://player.ooyala.com/v3/<player_branding_id></script>
<div id='playerContainer'></div>
<script>
var myPlayer = OO.Player.create('playerContainer', '<embed_code>', {
width: <width>, height: <height>
});
</script>
Any chance we could get V3 Player support in? I believe you have to contact Ooyala to get the Player enabled for your account, as we've done, but that was a fairly quick affair. (Requested it last night; it was enabled by noon today.)
I'll probably be switching our site to use the new player API; I think an option in Ooyala would be great. I will try to write a patch for 6.x and 7.x in the coming weeks, if no one else gets to it first.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | ooyala_v3_player-d6.patch | 16.1 KB | quicksketch |
| #22 | ooyala_v3_player-d7.patch | 16.41 KB | quicksketch |
| #19 | mobile-drupal-ooyala-html5-v3.png | 417.4 KB | torgospizza |
| #18 | ooyala_v3_player.patch | 15.57 KB | quicksketch |
| #10 | ooyala_v3_player.patch | 5.87 KB | quicksketch |
Comments
Comment #1
torgospizzaHere's a link to the documentation: http://support.ooyala.com/developers/documentation/concepts/book_player_...
Comment #2
pwhstacy commentedHi..
You can refer below link :-
http://support.ooyala.com/developers/documentation/concepts/player_v3_de...
Comment #3
torgospizzaThat's a good link too.
Additionally here's a Basic V3 page: http://support.ooyala.com/developers/documentation/reference/player_v3_d... - lots of good, useful information.
Comment #4
makangus commentedAttached a patch to use the V3 way to embed the player.
A few things:
There is definitely more work to do, but I am hoping at least this gives us a starting point to open a new branch for v3.
Comment #5
eojthebraveI think this line needs to be something like $params = json_encode($vars['params']); or drupal_json_encode().
Otherwise you're not allowing other modules to add additional paramaters to the OO.Player.create() call.
Powered by Dreditor.
Comment #6
makangus commentedThat's what I had at the beginning, but Ooyala doesn't know how to read the JSON. The issue is json_encode creates
{'width': '123', 'height': '123'}instead of{width: 123, height: 123}. Ooyala needs to read the second format, which is technically invalid JSON but valid JavaScript.Comment #7
torgospizzaThat may be an upstream issue worth bringing up to the Ooyala engineers. They've been pretty responsive in the past.
Comment #8
eojthebraveI've passed the feedback about player.onCreate along to Ooyala so we'll see what happens there.
Another thing to point out is that we might want to make the entire player URL configurable not just the playerID portion of it. The reason being you can pass in additional paramaters to the URlL like ?version={{VERSION}} or ?debug=true
So maybe a textfield for 'ooyala_player_id', and one for 'ooyala_player_url'
Comment #9
torgospizzaGreat idea. Thanks for taking the initiative!
Comment #10
quicksketchI made a start at this, provided by the patch attached.
I've noticed we have numerous places depending upon the old API, i.e. ooyala_merkers module, that will need to be updated to use the new subscriber "bus" model. The new API is nicer, IMO, but currently still pretty buggy.
Comment #11
quicksketchOh, as implied by the patch, I had started to make this be a backwards compatible system for existing users who want to stick with the v2 player. Of course that means we'd need to abstract out any use of the API to use both v2 and v3 players.
Comment #12
quicksketchThis is only true if '123' is a string, rather than an integer data type. I'm pretty sure it gets formatted correctly assuming it the right type. We can manually set these to ensure they're correct.
Comment #13
torgospizzaAwesome, thanks quicksketch! I will try to test this out soon.
Comment #14
torgospizzaJust a couple notes, I see some violations of #1148406: Standardize embedcode / embed_code / embedCode variables where the new patch is using variations of 'embedCode' and 'embedcode' and not 'embed_code'. Perhaps that's because it's rolled against the beta and not -dev? I'm using -dev for my tests, so if you'd like I can get my working copy fixed and then roll a new patch. (The new patch might include some additional variable clean-up as I mention in my comment in that issue.
EDIT, also I'm not seeing any admin config form to set the 'ooyala_player_version' so I've added that as a textfield in ooyala.pages.inc.
Also looks like we don't have the variable 'ooyala_player_id' configured anywhere, which causes the Player JS to throw a 404; I feel like this should be a per-node-type variable as well, so that for instance, I can use different player branding IDs for "Sample" videos vs. "Purchased video" embeds.
Comment #15
quicksketchHiya @torgosPizza! Glad to know you're still following this issue.
Sorry I was going to post a new reroll today. My patch is ON TOP of makangus's patch in #4.
I think you're right that more control over players is necessary. I believe it's also possible to pull the player ID from backlot on a per-video basis. It seems like that would make a lot of sense rather than asking the user what Player ID should be used at all. Or alternatively we can retrieve the list of players and let the user choose the desired player from a list. As you say this could be per-field or per-video. I'm not sure where the right balance is.
Player IDs are a bit weird. For each player you use on the site, you have to give it a separate namespace (see http://support.ooyala.com/developers/documentation/reference/player_v3_d...), which also has the effect of changing the global variables used to access some of the APIs. All of this makes me think using a single "default" player ID for now might be a good starting point to get rolling with the v3 player.
Comment #16
quicksketchActually on further inspection my previous patch is all kinds of messed up. I'm working on a followup patch that does things correctly.
Comment #17
torgospizzaThanks, I'm glad you noticed! I had some failures and so I tried doing it by hand, and then I was getting the 404s as I mentioned in the other Issue.. I finally did get the player showing up in Chrome but not Firefox! But anyway - I eagerly await your reroll. :)
Thanks!
Comment #18
quicksketchHere's a reroll that adds backwards compatibility for existing users if they need the V2 player (however currently it will switch them to V3 upon patching, maybe we should write an upgrade path?) Really appreciate your thoughts @torgosPizza!
Comment #19
torgospizzaAwesome! Applied cleanly, and I am seeing player embeds on the first try. Awesome work!
Admin settings work nicely, and v2 worked just as well as v3. A notice or an upgrade path would probably be good, since it's (as of last time I checked, anyway) required that you contact Ooyala to have V3 configured on your account. Otherwise, people who apply this code might find themselves with broken Ooyala embeds until they get V3 setup.
Aside from that, I even tested the HTML5 capability on my Android browser and it worked like a charm. Delicious awesomesauce.
Excellent work as always, @quicksketch. Marking as RTBC, unless you find any issues, but those can probably go into a follow-up (along with things like "per-content type Player ID" as discussed in #15).
Here's my test node in case you're interested: http://dev.rifftrax.com/node/3323846
And attached a screenshot from my phone.
Comment #20
quicksketchGood point, and more importantly, users *must* enter a player ID currently for the V3 player to work. Since we can't determine that automatically (afaik) we should add an upgrade path that sets the default version to V2 for existing users and leaves the default of V3 for new installs. I'll put on an upgrade hook that simply sets the variable (note this means you'll have to set your player *back* to V3 after running the upgrade).
Comment #21
torgospizzaThat sounds like a perfect compromise. Thanks!
Comment #22
quicksketchHere's a patch that adds an upgrade hook that sets the player variable to v2 for existing installs. New installs will default to v3. Backport to D6 also attached. After testing everything functions the same as D7, I've committed the patches to the corresponding 2.x branch.
Comment #23
torgospizzaYou rock. Thanks!