Control:
Bytes | Appends | Elapsed Milliseconds |
---|---|---|
1000 | 10000 | 2898 |
1000 | 10000 | 2898 |
1000 | 10000 | 2899 |
Converting the Uint8Array to a "binary string" with String.fromCharCode and then using btoa:
/* Create an event logger for a player. Note how we attach it to the event emitter for a player. You can attach the logger to the catalog's event emitter as well! */ | |
BCEventLogger *playerLogger = [[BCEventLogger alloc]initWithEventEmitter:player.playbackEmitter]; | |
/* If you're in verbose mode, this string will be prepended to all the logging */ | |
[playerLogger setLoggingPrefix:@"Player"]; | |
/* The logger is verbose by default and prints out every event and all the properties of that event. Non-verbose mode just prints out the event name */ | |
playerLogger.verbose = false; | |
/* We don't recommend leaving this on for "production" code but it can be handy to know what component sent a particular event when debugging. If you add this line, the sender will be printed out as well. */ |
<!doctype html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<video src="http://brightcove.vo.llnwd.net/e1/uds/pd/507017973001/507017973001_1247361339001_shark-1080p.mp4?playerId=558043668001&lineupId=&affiliateId=&pubId=507017973001&videoId=1247311399001"></video> | |
<script> | |
var video = document.querySelector('video'); | |
console.log(video.src); // logs the video URL |
<!doctype html> | |
<html> | |
<head> | |
<title>A Very Tiny MP4</title> | |
</head> | |
<body> | |
<video src="data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAr9tZGF0AAACoAYF//+c3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDEyNSAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTIgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0xIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDM6MHgxMTMgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTEgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MyBiX3B5cmFtaWQ9MiBiX2FkYXB0PTEgYl9iaWFzPTAgZGlyZWN0PTEgd2VpZ2h0Yj0xIG9wZW5fZ29wPTAgd2VpZ2h0cD0yIGtleWludD0yNTAga2V5aW50X21pbj0yNCBzY2VuZWN1dD00MCBpbnRyYV9yZWZyZXNoPTAgcmNfbG9va2FoZWFkPTQwIHJjPWNyZiBtYnRyZWU9MSBjcmY9MjMuMCBxY29tcD0wLjYwIHFwbWluPTAgcXBtYX |
<!doctype html> | |
<html> | |
<head> | |
<title>No ended event on Android Chrome</title> | |
</head> | |
<video width=600 height=300 src="http://vjs.zencdn.net/v/oceans.mp4" controls> | |
<script> | |
var video = document.querySelector('video'); | |
video.addEventListener('ended', function() { | |
alert('ended'); |
var req = new XMLHttpRequest(); | |
req.open('GET', segmentUrl, true); | |
req.responseType = 'arraybuffer'; | |
req.onload = function(response) { | |
self.onSegmentLoadComplete(new Uint8Array(req.response)); | |
}; | |
req.send(null); |
{ | |
"media": { | |
"sources": [ | |
{ | |
"src": "http://vjs.zencdn.net/v/oceans.mp4", | |
"type": "video/mp4" | |
} | |
], | |
"width": "240vh", | |
"height": "41.6667vw", |
#! /bin/sh | |
# stop immediately if any errors are encountered | |
set -o errexit | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: version.sh [<newversion> | major | minor | patch | build]" | |
exit 1 | |
fi |
videojs.plugin('iframePlay', function(options) { | |
var player = this; | |
options = options || {}; | |
window.addEventListener('message', function(event) { | |
if (!options.origin || options.origin === event.origin && event.data === 'play') { | |
player.play(); | |
} | |
}); | |
}); |
Control:
Bytes | Appends | Elapsed Milliseconds |
---|---|---|
1000 | 10000 | 2898 |
1000 | 10000 | 2898 |
1000 | 10000 | 2899 |
Converting the Uint8Array to a "binary string" with String.fromCharCode and then using btoa:
{"head":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":0,"columnNumber":0,"hitCount":0,"callUID":102868226,"children":[{"functionName":"(program)","scriptId":"0","url":"","lineNumber":0,"columnNumber":0,"hitCount":3905,"callUID":411222278,"children":[],"deoptReason":"","id":2},{"functionName":"(idle)","scriptId":"0","url":"","lineNumber":0,"columnNumber":0,"hitCount":163271,"callUID":1234597172,"children":[],"deoptReason":"","id":3},{"functionName":"e","scriptId":"6371","url":"http://localhost:9999/node_modules/video.js/dist/video-js/video.js","lineNumber":13,"columnNumber":34,"hitCount":3,"callUID":3864617514,"children":[{"functionName":"(anonymous function)","scriptId":"6371","url":"http://localhost:9999/node_modules/video.js/dist/video-js/video.js","lineNumber":49,"columnNumber":434,"hitCount":1,"callUID":1247461525,"children":[{"functionName":"t.buffered","scriptId":"6371","url":"http://localhost:9999/node_modules/video.js/dist/video-js/video.js","lineNumber":54,"columnNumber":20,"hitCount" |