<script>
OO.ready(function() {
OO.Player.create('container', 'content's embed_code', {
onCreate: function (player) {
player.mb.subscribe(
OO.EVENTS.ERROR,
'drm-test',
function (event, error) {
if (error.code === 'faxsDrmError') {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Ooyala Standalone IQ demo</title> | |
<script src="//analytics.ooyala.com/static/analytics.js"></script> | |
</head> | |
<body> | |
<div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import datetime | |
import json | |
import urllib | |
import httplib | |
import hashlib | |
import base64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>test</title> | |
<script src="ua-parser.min.js"></script> | |
<script src="swfobject.js"></script> | |
<script src="//player.ooyala.com/v3/{YOUR-PLAYER-ID}"></script> | |
</head> | |
<body> |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Pause Test</title>
<script src="//player.ooyala.com/v3/7267438d470c471eb75a165a8b670617?platform=html5-priority"></script>
</head>
<body>
<div id="container" style="width:640px;height:360px"></div>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OO.ready(() => { | |
const player = OO.Player.create('container', '{embed_code}', playerParam); | |
if (OO.isSmartTV) { | |
player.mb.subscribe(OO.EVENTS.BITRATE_CHANGED, 'example', () => { | |
setHighestQuality(player); | |
}); | |
} else { | |
player.mb.subscribe(OO.EVENTS.BITRATE_CHANGED, 'example', () => { | |
avoidHighestQuality(player); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Script (requires node 6+) | |
const fetch = require('node-fetch'); | |
const baseURL = 'http://player.ooyala.com'; | |
const pcode = 'BtbmUyOlamRiH-S0S-iUeNvf_ghr'; | |
const embedCode = 'tzNDI1NzE6gt3qQPR46SU5yi9lDEYLRJ'; | |
const queryString = 'device=html5&domain=comment.my-demo.link'; | |
const requestURL = `${baseURL}/sas/player_api/v1/authorization/embed_code/${pcode}/${embedCode}?${queryString}`; |
Each of us runs six servers on a single local machine, so that we can show responsive demos. Below are the instructions on how to run the servers locally.
-
Save the following script as run.sh
#/bin/sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>IQ JS SDK Demo</title> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<script src="//player.ooyala.com/static/v4/stable/4.10.6/core.min.js"></script> | |
<script src="//player.ooyala.com/static/v4/stable/4.10.6/video-plugin/main_html5.min.js"></script> | |
<script src="//player.ooyala.com/static/v4/stable/4.10.6/video-plugin/osmf_flash.min.js"></script> | |
<script src="//player.ooyala.com/static/v4/stable/4.10.6/video-plugin/bit_wrapper.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const OoyalaApi = require('ooyala-api'); | |
const api = new OoyalaApi("Your-API-Key", "Your-API-Secret"); | |
api.get('/v2/assets', {limit: 500}, {recursive: true}) | |
.then(list => { | |
return list.filter(asset => asset.asset_type === 'video'); | |
}) | |
.then(list => { | |
return Promise.all(list.map(asset => getSourceFileSize(asset.embed_code))); |