Skip to content

Instantly share code, notes, and snippets.

View jpmedley's full-sized avatar

Joe Medley jpmedley

View GitHub Profile
@jpmedley
jpmedley / inserted-fragment.html
Last active March 13, 2017 22:20
Inserted fragment.
<!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">
@jpmedley
jpmedley / progress.js
Last active November 13, 2017 21:00
Wait for currentTime to progress
// Example assumes that playbackRage == 1
function _appendPiece(piece, onQuotaError) {
try {
sourceBuffer.appendBuffer(piece);
}
catch e {
if (e.name !== 'QuotaExceededError') { throw e; }
onQuotaError(e);
}
// 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 / reporting_observer.js
Created July 24, 2018 13:53 — forked from ebidel/reporting_observer.js
Using a ReportingObserver to watch for deprecation warnings on page.
/**
* @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 => {
Changes to be committed:
modified: ../.github/pull_request_template.md
modified: ../app.yaml
modified: images/lockup.svg
renamed: site/_data/authors.json -> site/_data/contributors.json
modified: site/_includes/codelab.njk
modified: site/_includes/components/Author.js
modified: site/_includes/components/AuthorInfo.js
modified: site/_includes/components/Compare.js
Next, create a new file in this directory called `manifest.json`. This JSON object describes the extension's
capabilities and configuration. For example, most manifest files contain an `"action"` key which declares
the image Chrome should use as the extension's action icon and the HTML page to show in a popup when the
extension's action icon is clicked.
Add the following code:
```json
...
```