Skip to content

Commit 79239ac

Browse files
committed
Update simplest-streaming example app
Due to misleading support of mp4 videos in different browsers. I’ve changed video example to mp3 audio. Yes, from now Chromium dropped support for mp4 in favour of webm
1 parent 5cda0ae commit 79239ac

File tree

6 files changed

+62
-60
lines changed

6 files changed

+62
-60
lines changed

demo-simplest-streaming/.meteor/packages

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66

77
meteor-base@1.0.4 # Packages every Meteor app needs to have
88
mobile-experience@1.0.4 # Packages for a great mobile UX
9-
mongo@1.1.12 # The database Meteor supports right now
9+
mongo@1.1.12_1 # The database Meteor supports right now
1010
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
1111
reactive-var@1.0.10 # Reactive variable for tracker
1212
jquery@1.11.9 # Helpful client-side library
1313
tracker@1.1.0 # Meteor's client-side reactive programming library
1414

15-
standard-minifier-css@1.2.0 # CSS minifier run for production mode
16-
standard-minifier-js@1.2.0 # JS minifier run for production mode
17-
es5-shim@4.6.14 # ECMAScript 5 compatibility for older browsers.
18-
ecmascript@0.5.8 # Enable ECMAScript2015+ syntax in app code
15+
standard-minifier-css@1.2.0_1 # CSS minifier run for production mode
16+
standard-minifier-js@1.2.0_1 # JS minifier run for production mode
17+
es5-shim@4.6.14_1 # ECMAScript 5 compatibility for older browsers.
18+
ecmascript@0.5.8_1 # Enable ECMAScript2015+ syntax in app code
1919

2020
ostrio:files
21-
shell-server
21+
shell-server@0.2.1
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
METEOR@1.4.1.1
1+
METEOR@1.4.1.2
+39-37
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,73 @@
11
allow-deny@1.0.5
2-
autoupdate@1.2.11
3-
babel-compiler@6.9.1
4-
babel-runtime@0.1.11
2+
autoupdate@1.3.11
3+
babel-compiler@6.9.1_1
4+
babel-runtime@0.1.11_1
55
base64@1.0.9
66
binary-heap@1.0.9
7-
blaze@2.1.8
8-
blaze-html-templates@1.0.4
9-
blaze-tools@1.0.9
10-
boilerplate-generator@1.0.9
11-
caching-compiler@1.1.7
12-
caching-html-compiler@1.0.6
7+
blaze@2.1.9
8+
blaze-html-templates@1.0.5
9+
blaze-tools@1.0.10
10+
boilerplate-generator@1.0.10
11+
caching-compiler@1.1.7_1
12+
caching-html-compiler@1.0.7
1313
callback-hook@1.0.9
1414
check@1.2.3
15-
coffeescript@1.2.4_1
15+
coffeescript@1.2.4_2
1616
ddp@1.2.5
17-
ddp-client@1.2.9
17+
ddp-client@1.3.1_1
1818
ddp-common@1.2.6
19-
ddp-server@1.2.10
19+
ddp-server@1.3.10_1
2020
deps@1.0.12
2121
diff-sequence@1.0.6
22-
ecmascript@0.5.8
23-
ecmascript-runtime@0.3.14
22+
ecmascript@0.5.8_1
23+
ecmascript-runtime@0.3.14_1
2424
ejson@1.0.12
25-
es5-shim@4.6.14
25+
es5-shim@4.6.14_1
2626
fastclick@1.0.12
2727
geojson-utils@1.0.9
2828
hot-code-push@1.0.4
29-
html-tools@1.0.10
30-
htmljs@1.0.10
31-
http@1.2.9
29+
html-tools@1.0.11
30+
htmljs@1.0.11
31+
http@1.2.9_1
3232
id-map@1.0.8
3333
jquery@1.11.9
3434
launch-screen@1.0.12
3535
livedata@1.0.18
36-
logging@1.1.15
37-
meteor@1.2.17
36+
logging@1.1.15_1
37+
meteor@1.2.17_1
3838
meteor-base@1.0.4
39-
minifier-css@1.2.14
40-
minifier-js@1.2.14
39+
minifier-css@1.2.14_1
40+
minifier-js@1.2.14_1
4141
minimongo@1.0.17
4242
mobile-experience@1.0.4
4343
mobile-status-bar@1.0.12
44-
modules@0.7.6
45-
modules-runtime@0.7.6
46-
mongo@1.1.12
44+
modules@0.7.6_1
45+
modules-runtime@0.7.6_1
46+
mongo@1.1.12_5
4747
mongo-id@1.0.5
48-
npm-mongo@1.5.48
49-
observe-sequence@1.0.12
48+
npm-mongo@2.2.10_1
49+
observe-sequence@1.0.13
5050
ordered-dict@1.0.8
5151
ostrio:cookies@2.0.5
52-
ostrio:files@1.7.2
53-
promise@0.8.4
52+
ostrio:files@1.7.4
53+
promise@0.8.7
5454
random@1.0.10
5555
reactive-var@1.0.10
5656
reload@1.1.10
5757
retry@1.0.8
5858
routepolicy@1.0.11
5959
shell-server@0.2.1
60-
spacebars@1.0.12
61-
spacebars-compiler@1.0.12
62-
standard-minifier-css@1.2.0
63-
standard-minifier-js@1.2.0
64-
templating@1.2.14
65-
templating-tools@1.0.4
60+
spacebars@1.0.13
61+
spacebars-compiler@1.0.13
62+
standard-minifier-css@1.2.1
63+
standard-minifier-js@1.2.0_1
64+
templating@1.2.15
65+
templating-compiler@1.2.15
66+
templating-runtime@1.2.15
67+
templating-tools@1.0.5
6668
tracker@1.1.0
67-
ui@1.0.11
69+
ui@1.0.12
6870
underscore@1.0.9
6971
url@1.0.10
70-
webapp@1.3.11
72+
webapp@1.3.11_1
7173
webapp-hashing@1.0.9

demo-simplest-streaming/client/main.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ <h1>Meteor-Files: File Streaming</h1>
1616
Loading Image...
1717
{{/with}}
1818
<hr>
19-
{{#with videoFile.with}}
20-
<video height="auto" controls preload="auto" autoplay>
19+
{{#with audioFile.with}}
20+
<audio height="auto" controls preload="auto" autoplay>
2121
<source src="{{link}}?play=true" type="{{type}}" />
22-
</video>
22+
</audio>
2323
{{else}}
24-
Loading Video...
24+
Loading Audio...
2525
{{/with}}
2626
</template>
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Template } from 'meteor/templating';
2-
import { Videos, Images } from '../lib/files.collections.js';
2+
import { Sounds, Images } from '../lib/files.collections.js';
33
import './main.html';
44

55
Template.file.helpers({
66
imageFile: function () {
77
return Images.findOne();
88
},
9-
videoFile: function () {
10-
return Videos.findOne();
9+
audioFile: function () {
10+
return Sounds.findOne();
1111
}
1212
});

demo-simplest-streaming/lib/files.collections.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ let Images = new FilesCollection({
99
}
1010
});
1111

12-
let Videos = new FilesCollection({
12+
let Sounds = new FilesCollection({
1313
debug: true,
14-
collectionName: 'Videos',
14+
collectionName: 'Sounds',
1515
onBeforeUpload() {
1616
// Disallow uploads from client
1717
return false;
@@ -21,7 +21,7 @@ let Videos = new FilesCollection({
2121
// To have sample files in DB we will upload them on server startup:
2222
if (Meteor.isServer) {
2323
Images.denyClient();
24-
Videos.denyClient();
24+
Sounds.denyClient();
2525

2626
Meteor.startup(() => {
2727
if (!Images.findOne()) {
@@ -30,20 +30,20 @@ if (Meteor.isServer) {
3030
});
3131
}
3232

33-
if (!Videos.findOne()) {
34-
Videos.load('http://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_10mb.mp4', {
35-
fileName: 'Big-Buck-Bunny.mp4'
33+
if (!Sounds.findOne()) {
34+
Sounds.load('http://www.openmusicarchive.org/audio/Deep_Blue_Sea_Blues.mp3', {
35+
fileName: 'Deep_Blue_Sea_Blues.mp3'
3636
});
3737
}
3838
});
3939

4040
Meteor.publish('files.images.all', () => Images.find().cursor);
41-
Meteor.publish('files.videos.all', () => Videos.find().cursor);
41+
Meteor.publish('files.sounds.all', () => Sounds.find().cursor);
4242

4343
} else {
4444

4545
Meteor.subscribe('files.images.all');
46-
Meteor.subscribe('files.videos.all');
46+
Meteor.subscribe('files.sounds.all');
4747
}
4848

49-
export { Videos, Images }
49+
export { Sounds, Images }

0 commit comments

Comments
 (0)