found in ipfs:
[ipfs hash]
[ipfs content]
diff --git a/examples/browser-browserify/src/index.js b/examples/browser-browserify/src/index.js
index afea210ea0..af565ae325 100644
--- a/examples/browser-browserify/src/index.js
+++ b/examples/browser-browserify/src/index.js
@@ -9,22 +9,23 @@ document.addEventListener('DOMContentLoaded', async () => {
async function store () {
const toStore = document.getElementById('source').value
+ const result = await node.add(toStore)
- const res = await node.add(toStore)
-
- res.forEach((file) => {
+ for (const file of result) {
if (file && file.hash) {
console.log('successfully stored', file.hash)
- display(file.hash)
+
+ await display(file.hash)
}
- })
+ }
}
async function display (hash) {
- // buffer: true results in the returned result being a buffer rather than a stream
const data = await node.cat(hash)
+
document.getElementById('hash').innerText = hash
document.getElementById('content').innerText = data
+ document.getElementById('output').setAttribute('style', 'display: block')
}
document.getElementById('store').onclick = store
diff --git a/examples/browser-browserify/test.js b/examples/browser-browserify/test.js
new file mode 100644
index 0000000000..4b729108d4
--- /dev/null
+++ b/examples/browser-browserify/test.js
@@ -0,0 +1,21 @@
+'use strict'
+
+const pkg = require('./package.json')
+
+module.exports = {
+ [pkg.name]: function (browser) {
+ browser
+ .url(process.env.IPFS_EXAMPLE_TEST_URL)
+ .waitForElementVisible('#source')
+ .setValue('#source', 'hello')
+ .waitForElementVisible('#store')
+ .pause(1000)
+ .click('#store')
+ .waitForElementVisible('#output')
+
+ browser.expect.element('#hash').text.to.contain('QmWfVY9y3xjsixTgbd9AorQxH7VtMpzfx2HaWtsoUYecaX')
+ browser.expect.element('#content').text.to.contain('hello')
+
+ browser.end()
+ }
+}
diff --git a/examples/browser-create-react-app/package.json b/examples/browser-create-react-app/package.json
index be623e00d0..37734fb3e3 100644
--- a/examples/browser-create-react-app/package.json
+++ b/examples/browser-create-react-app/package.json
@@ -8,7 +8,7 @@
"ipfs-css": "^0.13.1",
"react": "^16.8.0",
"react-dom": "^16.8.0",
- "react-scripts": "3.1.1",
+ "react-scripts": "^3.2.0",
"tachyons": "^4.11.1"
},
"scripts": {
diff --git a/examples/browser-create-react-app/src/App.js b/examples/browser-create-react-app/src/App.js
index 8d8a20d483..f742be5208 100755
--- a/examples/browser-create-react-app/src/App.js
+++ b/examples/browser-create-react-app/src/App.js
@@ -36,12 +36,12 @@ const IpfsId = (props) => {
if (!props) return null
return (
- Connected to IPFS
+ Connected to IPFS
{['id', 'agentVersion'].map((key) => (
{key}
-
{props[key]}
+
{props[key]}
))}
diff --git a/examples/browser-create-react-app/src/hooks/use-ipfs-factory.js b/examples/browser-create-react-app/src/hooks/use-ipfs-factory.js
index 31c88fe08e..fa0464d484 100644
--- a/examples/browser-create-react-app/src/hooks/use-ipfs-factory.js
+++ b/examples/browser-create-react-app/src/hooks/use-ipfs-factory.js
@@ -25,7 +25,7 @@ export default function useIpfsFactory ({ commands }) {
return function cleanup () {
if (ipfs && ipfs.stop) {
console.log('Stopping IPFS')
- ipfs.stop()
+ ipfs.stop().catch(err => console.error(err))
setIpfsReady(false)
}
}
diff --git a/examples/browser-create-react-app/test.js b/examples/browser-create-react-app/test.js
new file mode 100644
index 0000000000..812769aca0
--- /dev/null
+++ b/examples/browser-create-react-app/test.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const pkg = require('./package.json')
+
+module.exports = {
+ [pkg.name]: function (browser) {
+ browser
+ .url(process.env.IPFS_EXAMPLE_TEST_URL)
+ .waitForElementVisible('[data-test=title]')
+ .assert.containsText('[data-test=title]', 'Connected to IPFS')
+ .assert.elementPresent('[data-test=id')
+ .assert.elementPresent('[data-test=agentVersion')
+ .end()
+ }
+}
+
diff --git a/examples/browser-mfs/package.json b/examples/browser-mfs/package.json
index c6558793c8..47dc9915a2 100644
--- a/examples/browser-mfs/package.json
+++ b/examples/browser-mfs/package.json
@@ -18,7 +18,7 @@
"webpack-cli": "^3.0.8"
},
"dependencies": {
- "ipfs": "../../",
+ "ipfs": "file:../../",
"mime-sniffer": "~0.0.3"
}
}
diff --git a/examples/browser-mfs/test.js b/examples/browser-mfs/test.js
new file mode 100644
index 0000000000..59f88a0460
--- /dev/null
+++ b/examples/browser-mfs/test.js
@@ -0,0 +1,47 @@
+'use strict'
+
+const pkg = require('./package.json')
+
+module.exports = {
+ [pkg.name]: function (browser) {
+ browser
+ .url(process.env.IPFS_EXAMPLE_TEST_URL)
+ .waitForElementNotVisible('#modal-screen')
+ .waitForElementVisible('#log')
+
+ browser.expect.element('#log').text.to.contain('IPFS: Drop some files into this window to get started')
+
+ browser.waitForElementVisible('#button-mkdir')
+ .click('#button-mkdir')
+ .waitForElementVisible('#form-mkdir-path')
+ .clearValue('#form-mkdir-path')
+ .setValue('#form-mkdir-path', '/folder')
+ .click('#button-form-mkdir-submit')
+
+ browser.expect.element('#files').text.to.contain('folder/')
+
+ browser.click('#button-cp')
+ .waitForElementVisible('#form-cp-path')
+ .clearValue('#form-cp-path')
+ .setValue('#form-cp-path', '/folder')
+ .clearValue('#form-cp-dest')
+ .setValue('#form-cp-dest', '/folder-copy')
+ .click('#button-form-cp-submit')
+
+ browser.expect.element('#files').text.to.contain('folder-copy/')
+
+ browser.click('#button-mv')
+ .waitForElementVisible('#form-mv-path')
+ .clearValue('#form-mv-path')
+ .setValue('#form-mv-path', '/folder')
+ .clearValue('#form-mv-dest')
+ .setValue('#form-mv-dest', '/folder-other')
+ .click('#button-form-mv-submit')
+
+ browser.expect.element('#files').text.to.not.contain('folder/')
+ browser.expect.element('#files').text.to.contain('folder-other/')
+
+ browser.end()
+ }
+}
+
diff --git a/examples/browser-parceljs/test.js b/examples/browser-parceljs/test.js
new file mode 100644
index 0000000000..ad5f99558a
--- /dev/null
+++ b/examples/browser-parceljs/test.js
@@ -0,0 +1,15 @@
+'use strict'
+
+const pkg = require('./package.json')
+
+module.exports = {
+ [pkg.name]: function (browser) {
+ browser
+ .url(process.env.IPFS_EXAMPLE_TEST_URL)
+ .waitForElementVisible('#output')
+
+ browser.expect.element('#output').text.to.contain('The contents of the file was: Hello from parcel.js bundled ipfs example')
+
+ browser.end()
+ }
+}
diff --git a/examples/browser-readablestream/test.js b/examples/browser-readablestream/test.js
new file mode 100644
index 0000000000..7434853ba8
--- /dev/null
+++ b/examples/browser-readablestream/test.js
@@ -0,0 +1,269 @@
+'use strict'
+
+const pkg = require('./package.json')
+
+module.exports = {
+ [pkg.name]: function (browser) {
+ browser
+ .url(process.env.IPFS_EXAMPLE_TEST_URL)
+ .waitForElementVisible('#output')
+
+ browser.expect.element('#output').text.to.contain('IPFS: Then press the "Go!" button to start playing a video')
+
+ browser.executeAsync(async function (done) {
+ const container = document.querySelector('#container')
+
+ // fake dropping a file
+ container.ondrop({
+ preventDefault: () => {},
+ dataTransfer: {
+ items: [{
+ kind: 'file',
+ getAsFile: () => {
+ // actually an .mp4 file, believe it or not
+ return [
+ 0x00, 0x00, 0x00, 0x14, 0x66, 0x74, 0x79, 0x70,
+ 0x71, 0x74, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x71, 0x74, 0x20, 0x20, 0x00, 0x00, 0x00, 0x08,
+ 0x77, 0x69, 0x64, 0x65, 0x00, 0x00, 0x00, 0xe0,
+ 0x6d, 0x64, 0x61, 0x74, 0x00, 0x00, 0x00, 0x15,
+ 0x06, 0x05, 0x11, 0x03, 0x87, 0xf4, 0x4e, 0xcd,
+ 0x0a, 0x4b, 0xdc, 0xa1, 0x94, 0x3a, 0xc3, 0xd4,
+ 0x9b, 0x17, 0x1f, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x23, 0x25, 0xb8, 0x08, 0x02, 0x02, 0x7f, 0xfa,
+ 0x78, 0x1f, 0x03, 0xf4, 0x82, 0x9f, 0xb9, 0xc6,
+ 0x5f, 0xef, 0x65, 0x2b, 0x9e, 0x18, 0xe1, 0x93,
+ 0xfb, 0xfb, 0x3a, 0x7f, 0x3f, 0x5d, 0x6c, 0xe9,
+ 0x20, 0xb9, 0x16, 0xe0, 0x00, 0x00, 0x00, 0x31,
+ 0x25, 0x12, 0xe0, 0x20, 0x08, 0x09, 0xff, 0xfa,
+ 0x78, 0x1f, 0x03, 0xf4, 0x82, 0x9f, 0xb9, 0xc6,
+ 0x5f, 0xef, 0x65, 0x2b, 0x9e, 0x18, 0xe1, 0x93,
+ 0xfb, 0xfb, 0x3a, 0x7f, 0x24, 0x94, 0x7d, 0x69,
+ 0xbf, 0x5d, 0xcd, 0xe6, 0xa6, 0xc0, 0xf0, 0xa7,
+ 0x91, 0xa8, 0x7c, 0x09, 0x66, 0xdf, 0x20, 0x89,
+ 0xae, 0x00, 0x00, 0x00, 0x15, 0x06, 0x05, 0x11,
+ 0x03, 0x87, 0xf4, 0x4e, 0xcd, 0x0a, 0x4b, 0xdc,
+ 0xa1, 0x94, 0x3a, 0xc3, 0xd4, 0x9b, 0x17, 0x1f,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x21, 0xe1,
+ 0x09, 0x10, 0x4f, 0xfe, 0xaa, 0x8c, 0x00, 0x00,
+ 0x00, 0x09, 0x21, 0x13, 0x84, 0x24, 0x41, 0x3f,
+ 0xfe, 0xaa, 0x8c, 0x00, 0x00, 0x00, 0x15, 0x06,
+ 0x05, 0x11, 0x03, 0x87, 0xf4, 0x4e, 0xcd, 0x0a,
+ 0x4b, 0xdc, 0xa1, 0x94, 0x3a, 0xc3, 0xd4, 0x9b,
+ 0x17, 0x1f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08,
+ 0x01, 0xa8, 0x81, 0x62, 0x08, 0xff, 0x20, 0x20,
+ 0x00, 0x00, 0x00, 0x08, 0x01, 0x12, 0xa2, 0x05,
+ 0x88, 0x23, 0x20, 0x20, 0x00, 0x00, 0x05, 0xa6,
+ 0x6d, 0x6f, 0x6f, 0x76, 0x00, 0x00, 0x00, 0x6c,
+ 0x6d, 0x76, 0x68, 0x64, 0x00, 0x00, 0x00, 0x00,
+ 0xd9, 0xc3, 0xbb, 0x69, 0xd9, 0xc3, 0xbb, 0x69,
+ 0x00, 0x00, 0x17, 0x70, 0x00, 0x00, 0x00, 0x68,
+ 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x03, 0xc0, 0x74, 0x72, 0x61, 0x6b,
+ 0x00, 0x00, 0x00, 0x5c, 0x74, 0x6b, 0x68, 0x64,
+ 0x00, 0x00, 0x00, 0x0f, 0xd9, 0xc3, 0xbb, 0x69,
+ 0xd9, 0xc3, 0xbb, 0x69, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
+ 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44,
+ 0x74, 0x61, 0x70, 0x74, 0x00, 0x00, 0x00, 0x14,
+ 0x63, 0x6c, 0x65, 0x66, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x38, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x14, 0x70, 0x72, 0x6f, 0x66,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
+ 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14,
+ 0x65, 0x6e, 0x6f, 0x66, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x38, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x24, 0x65, 0x64, 0x74, 0x73,
+ 0x00, 0x00, 0x00, 0x1c, 0x65, 0x6c, 0x73, 0x74,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x62,
+ 0x6d, 0x64, 0x69, 0x61, 0x00, 0x00, 0x00, 0x20,
+ 0x6d, 0x64, 0x68, 0x64, 0x00, 0x00, 0x00, 0x00,
+ 0xd9, 0xc3, 0xbb, 0x69, 0xd9, 0xc3, 0xbb, 0x69,
+ 0x00, 0x00, 0x17, 0x70, 0x00, 0x00, 0x01, 0x2c,
+ 0x55, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31,
+ 0x68, 0x64, 0x6c, 0x72, 0x00, 0x00, 0x00, 0x00,
+ 0x6d, 0x68, 0x6c, 0x72, 0x76, 0x69, 0x64, 0x65,
+ 0x61, 0x70, 0x70, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x43, 0x6f, 0x72,
+ 0x65, 0x20, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x20,
+ 0x56, 0x69, 0x64, 0x65, 0x6f, 0x00, 0x00, 0x02,
+ 0x09, 0x6d, 0x69, 0x6e, 0x66, 0x00, 0x00, 0x00,
+ 0x14, 0x76, 0x6d, 0x68, 0x64, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x40, 0x80, 0x00, 0x80, 0x00, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x38, 0x68, 0x64, 0x6c,
+ 0x72, 0x00, 0x00, 0x00, 0x00, 0x64, 0x68, 0x6c,
+ 0x72, 0x61, 0x6c, 0x69, 0x73, 0x61, 0x70, 0x70,
+ 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x17, 0x43, 0x6f, 0x72, 0x65, 0x20, 0x4d,
+ 0x65, 0x64, 0x69, 0x61, 0x20, 0x44, 0x61, 0x74,
+ 0x61, 0x20, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65,
+ 0x72, 0x00, 0x00, 0x00, 0x24, 0x64, 0x69, 0x6e,
+ 0x66, 0x00, 0x00, 0x00, 0x1c, 0x64, 0x72, 0x65,
+ 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0c, 0x61, 0x6c, 0x69,
+ 0x73, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
+ 0x91, 0x73, 0x74, 0x62, 0x6c, 0x00, 0x00, 0x00,
+ 0xb6, 0x73, 0x74, 0x73, 0x64, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0xa6, 0x61, 0x76, 0x63, 0x31, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x38, 0x00,
+ 0x34, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05,
+ 0x48, 0x2e, 0x32, 0x36, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2a, 0x61,
+ 0x76, 0x63, 0x43, 0x01, 0x4d, 0x40, 0x0a, 0xff,
+ 0xe1, 0x00, 0x13, 0x27, 0x4d, 0x40, 0x0a, 0xa9,
+ 0x18, 0x84, 0xf2, 0xcf, 0x80, 0xb5, 0x01, 0x01,
+ 0x01, 0x30, 0xad, 0x7b, 0xdf, 0x01, 0x01, 0x00,
+ 0x04, 0x28, 0xfe, 0x09, 0x88, 0x00, 0x00, 0x00,
+ 0x12, 0x63, 0x6f, 0x6c, 0x72, 0x6e, 0x63, 0x6c,
+ 0x63, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x10, 0x70, 0x61, 0x73, 0x70, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x73,
+ 0x74, 0x74, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x28, 0x63,
+ 0x74, 0x74, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x01, 0xff,
+ 0xff, 0xff, 0x9c, 0x00, 0x00, 0x00, 0x20, 0x63,
+ 0x73, 0x6c, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x64, 0xff, 0xff, 0xff, 0x9c, 0x00,
+ 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x2c, 0x00, 0x00, 0x00, 0x14, 0x73,
+ 0x74, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x0f, 0x73, 0x64, 0x74, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x20, 0x10, 0x18, 0x00, 0x00,
+ 0x00, 0x1c, 0x73, 0x74, 0x73, 0x63, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x73, 0x74,
+ 0x73, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+ 0x00, 0x75, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00,
+ 0x00, 0x31, 0x00, 0x00, 0x00, 0x14, 0x73, 0x74,
+ 0x63, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
+ 0x00, 0x92, 0x6d, 0x65, 0x74, 0x61, 0x00, 0x00,
+ 0x00, 0x22, 0x68, 0x64, 0x6c, 0x72, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x64,
+ 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x6b, 0x65, 0x79, 0x73,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x28, 0x6d, 0x64, 0x74, 0x61,
+ 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c,
+ 0x65, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x74,
+ 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x69, 0x78, 0x65,
+ 0x6c, 0x64, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79,
+ 0x00, 0x00, 0x00, 0x30, 0x69, 0x6c, 0x73, 0x74,
+ 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x20, 0x64, 0x61, 0x74, 0x61,
+ 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x34,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1a,
+ 0x00, 0x00, 0x01, 0x72, 0x6d, 0x65, 0x74, 0x61,
+ 0x00, 0x00, 0x00, 0x22, 0x68, 0x64, 0x6c, 0x72,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6d, 0x64, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x6b, 0x65,
+ 0x79, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x6d, 0x64,
+ 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70,
+ 0x70, 0x6c, 0x65, 0x2e, 0x71, 0x75, 0x69, 0x63,
+ 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x6d, 0x61,
+ 0x6b, 0x65, 0x00, 0x00, 0x00, 0x21, 0x6d, 0x64,
+ 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70,
+ 0x70, 0x6c, 0x65, 0x2e, 0x71, 0x75, 0x69, 0x63,
+ 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x6d, 0x6f,
+ 0x64, 0x65, 0x6c, 0x00, 0x00, 0x00, 0x24, 0x6d,
+ 0x64, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x2e, 0x61,
+ 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x71, 0x75, 0x69,
+ 0x63, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73,
+ 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00,
+ 0x00, 0x00, 0x28, 0x6d, 0x64, 0x74, 0x61, 0x63,
+ 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65,
+ 0x2e, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x74, 0x69,
+ 0x6d, 0x65, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x65, 0x00,
+ 0x00, 0x00, 0xab, 0x69, 0x6c, 0x73, 0x74, 0x00,
+ 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x15, 0x64, 0x61, 0x74, 0x61, 0x00,
+ 0x00, 0x00, 0x01, 0x47, 0x42, 0x15, 0xc7, 0x41,
+ 0x70, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x26,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1e,
+ 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x01,
+ 0x47, 0x42, 0x15, 0xc7, 0x4d, 0x61, 0x63, 0x42,
+ 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x6f, 0x31, 0x34,
+ 0x2c, 0x32, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x00, 0x28, 0x64, 0x61,
+ 0x74, 0x61, 0x00, 0x00, 0x00, 0x01, 0x47, 0x42,
+ 0x15, 0xc7, 0x4d, 0x61, 0x63, 0x20, 0x4f, 0x53,
+ 0x20, 0x58, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x34,
+ 0x2e, 0x36, 0x20, 0x28, 0x31, 0x38, 0x47, 0x39,
+ 0x35, 0x29, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x28, 0x64, 0x61,
+ 0x74, 0x61, 0x00, 0x00, 0x00, 0x01, 0x47, 0x42,
+ 0x15, 0xc7, 0x32, 0x30, 0x31, 0x39, 0x2d, 0x31,
+ 0x30, 0x2d, 0x30, 0x39, 0x54, 0x31, 0x37, 0x3a,
+ 0x32, 0x38, 0x3a, 0x35, 0x38, 0x2b, 0x30, 0x31,
+ 0x30, 0x30
+ ]
+ }
+ }]
+ }
+ })
+
+ done()
+ })
+
+ browser.expect.element('#output').text.to.contain('IPFS: Added ')
+
+ browser.click('#gobutton')
+ .executeAsync(function (done) {
+ const video = document.getElementById('video')
+ video.addEventListener('canplay', function () {
+ done()
+ })
+
+ setTimeout(() => {
+ done('Did not start streaming video after 1m')
+ }, 60000)
+ }, [], (result) => {
+ if (result.value) {
+ throw new Error(result.value)
+ }
+ })
+
+ browser.end()
+ }
+}
+
+
diff --git a/examples/browser-script-tag/index.html b/examples/browser-script-tag/index.html
index 3f52de9d97..b30672ea45 100644
--- a/examples/browser-script-tag/index.html
+++ b/examples/browser-script-tag/index.html
@@ -2,7 +2,7 @@
IPFS in the Browser
-
+