Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/common/media.js

Issue 2015623004: Import wpt@ed94c51f3dfaa5ff4c9c311add1a560408059c51 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //
2 // Returns the URI of a supported video source based on the user agent
3 //
4 function getVideoURI(base)
5 {
6 var extension = '.mp4';
7
8 var videotag = document.createElement("video");
9
10 if ( videotag.canPlayType &&
11 videotag.canPlayType('video/ogg; codecs="theora, vorbis"') )
12 {
13 extension = '.ogv';
14 }
15
16 return base + extension;
17 }
18
19 //
20 // Returns the URI of a supported audio source based on the user agent
21 //
22 function getAudioURI(base)
23 {
24 var extension = '.mp3';
25
26 var audiotag = document.createElement("audio");
27
28 if ( audiotag.canPlayType &&
29 audiotag.canPlayType('audio/ogg') )
30 {
31 extension = '.oga';
32 }
33
34 return base + extension;
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698