Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
walsh9 committed Oct 11, 2014
1 parent 282520b commit 03aa2b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ Please report any issues or feature requests on the tracker. Thank you!
Once you've added the plugin script to your page, you can use it with any video:

```html
<head>
<script src="video.js"></script>
<script src="videojs-transcript.js"></script>
</head>
<body>
<video id="video">
<source src="whatever.webm" type="video/webm">
<track kind="captions" src="mycaptions.srt" srclang="en" label="English" default>
Expand All @@ -34,8 +37,9 @@ Once you've added the plugin script to your page, you can use it with any video:
var transcriptContainer = document.querySelector('#transcript');
transcriptContainer.appendChild(transcript.el());
</script>
</body>
```
There's also a [working example](example.html) of the plugin you can check out if you're having trouble.
There's also a [working example](https://walsh9.github.io/videojs-transcript/example.html) of the plugin you can check out if you're having trouble.

You'll also want to include one of the css files.
You can style the plugin as you like but there are a few examples in the /css folder to get you started.
Expand Down
12 changes: 6 additions & 6 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
margin: 40px auto;
}
</style>
</head>
<body>
<script src="node_modules/video.js/dist/video-js/video.js"></script>
<script src="dist/videojs-transcript.js"></script>
</head>
<body>
<div class="info">
<p>
You can see the Video.js Transcript plugin in action below.
Expand All @@ -40,8 +42,8 @@
<p>
Your browser doesn't support video. Please <a href="http://browsehappy.com/">upgrade your browser</a> to see the example.
</p>
<source src="http://www.openbeelden.nl/files/92/104101.ed_hd.mp4" type="video/mp4">
<source src="http://www.openbeelden.nl/files/92/104105.ed_hd.webm" type="video/webm">
<source src="//www.openbeelden.nl/files/92/104101.ed_hd.mp4" type="video/mp4">
<source src="//www.openbeelden.nl/files/92/104105.ed_hd.webm" type="video/webm">
<track kind="captions" src="captions/captions.en.srt" srclang="en" label="English" default>
<track kind="captions" src="captions/captions.sv.srt" srclang="sv" label="Swedish">
<track kind="captions" src="captions/captions.ru.srt" srclang="ru" label="Russian">
Expand All @@ -50,8 +52,6 @@
</video>
<div id="transcript"></div>
</div>
<script src="node_modules/video.js/dist/video-js/video.js"></script>
<script src="dist/videojs-transcript.js"></script>
<script>
var video = videojs('video');

Expand Down

0 comments on commit 03aa2b4

Please sign in to comment.