Skip to content

Instantly share code, notes, and snippets.

Joe Medley jpmedley

View GitHub Profile
@jpmedley
jpmedley / reporting_observer.js
Created Jul 24, 2018 — forked from ebidel/reporting_observer.js
Using a ReportingObserver to watch for deprecation warnings on page.
View reporting_observer.js
/**
* @author ebidel@ (Eric Bidelman)
* License Apache-2.0
*/
// Drop this in the DevTools console:
(new ReportingObserver((reports, observer) => {
console.warn('This page is using deprecated APIs or features:');
const deprecations = reports.map(report => {
View gist:f35015d0e0c8ad142e3e973a1955efa5
// Example assumes that playbackRage == 1
function _appendPiece(piece, onQuotaError) {
try {
sourceBuffer.appendBuffer(piece);
}
catch e {
if (e.name !== 'QuotaExceededError') { throw e; }
onQuotaError(e);
}
@jpmedley
jpmedley / progress.js
Last active Nov 13, 2017
Wait for currentTime to progress
View progress.js
// Example assumes that playbackRage == 1
function _appendPiece(piece, onQuotaError) {
try {
sourceBuffer.appendBuffer(piece);
}
catch e {
if (e.name !== 'QuotaExceededError') { throw e; }
onQuotaError(e);
}
View inserted-fragment.html
<!DOCTYPE html>
<html>
<!-- Media streaming example "Segment Request Array Insertion."
Based on ss-array.html, this is an experiment for inserting an ancillary
buffer into a continuous buffer streeam.
-->
<head>
<meta charset="utf-8" />
<title>Segment Request Array Insertion</title>
<link href="styles.css" rel="stylesheet">
You can’t perform that action at this time.