-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6cb097
commit 4d1bf6f
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Wavesurfer Media Session Plugin for Video.js Example</title> | ||
|
||
<link href="../bower_components/video.js/dist/video-js.min.css" rel="stylesheet"> | ||
<link href="css/style.css" rel="stylesheet"> | ||
|
||
<script src="../bower_components/video.js/dist/video.min.js"></script> | ||
<script src="../bower_components/wavesurfer.js/dist/wavesurfer.min.js"></script> | ||
<script src="../src/js/videojs.wavesurfer.js"></script> | ||
|
||
<style> | ||
/* change player background color */ | ||
#myAudio { | ||
background-color: #FFEEFF; | ||
} | ||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
<audio id="myAudio" class="video-js vjs-default-skin"></audio> | ||
|
||
<script> | ||
var player = videojs('myAudio', | ||
{ | ||
controls: true, | ||
autoplay: true, | ||
loop: false, | ||
width: 600, | ||
height: 300, | ||
plugins: { | ||
wavesurfer: { | ||
src: 'media/hal.wav', | ||
msDisplayMax: 10, | ||
debug: true, | ||
waveColor: 'grey', | ||
progressColor: 'black', | ||
cursorColor: 'black', | ||
hideScrollbar: true, | ||
metadata: { | ||
title: 'HAL 9000', | ||
artist: 'Douglas Rain', | ||
album: '2001: A Space Odyssey', | ||
artwork: [ | ||
{src: 'img/hal-9000-96x96.png', sizes: '96x96', type: 'image/png'}, | ||
{src: 'img/hal-9000-128x128.png', sizes: '128x128', type: 'image/png'}, | ||
{src: 'img/hal-9000-192x192.png', sizes: '192x192', type: 'image/png'}, | ||
{src: 'img/hal-9000-256x256.png', sizes: '256x256', type: 'image/png'}, | ||
{src: 'img/hal-9000-384x384.png', sizes: '384x384', type: 'image/png'}, | ||
{src: 'img/hal-9000-512x512.png', sizes: '512x512', type: 'image/png'}, | ||
] | ||
} | ||
} | ||
} | ||
}); | ||
|
||
// error handling | ||
player.on('error', function(error) | ||
{ | ||
console.warn(error); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters