-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video demo not showing video with waveform #8
Comments
If you change the video example by adding a <video id="myVideo" class="video-js vjs-default-skin" muted src="media/example.mp4"></video>
<script>
var player = videojs("myVideo",
{
controls: true,
autoplay: false,
loop: false,
width: 600,
height: 300,
plugins: {
wavesurfer: {
src: "media/example.mp4",
msDisplayMax: 10,
waveColor: "grey",
progressColor: "black",
cursorColor: "black",
hideScrollbar: true
}
}
}); Then you'll see the video underneath the waveform and both audio and video start playing when you press play. Unfortunately there are a couple of issues with this:
Hopefully this gives you some pointers on how to possibly work around those issues. The video feature in videojs-wavesurfer was a bonus feature when @katspaugh implemented waveforms for both audio and video files, so it was never my intention to support a use-case like yours, but feel free to open a PR if you manage to hack something together. |
Also see katspaugh/wavesurfer.js#510 for the wavesurfer related ticket. |
@thijstriemstra thanks for your answers on viewing the video along the waveform. The 100ms offset is probably hard to get away with this approach. The other part of my question was how to provide access the the wavesurfer instance, |
Finally found a reasonable approach to this! Use this config: var options = {
controls: true,
autoplay: false,
fluid: false,
loop: false,
width: 600,
height: 300,
plugins: {
wavesurfer: {
src: 'media/example.mp4',
msDisplayMax: 10,
debug: true,
waveColor: '#336699',
progressColor: 'black',
cursorColor: 'black',
hideScrollbar: true,
// options below are important ones
backend: 'MediaElement',
mediaType: 'video'
}
}
}; And you'll get something like this, all synced up: I will update the |
Is there any option to change the position of wave form to the bottom of video. Please advice. |
In the video example I would expect to see the video playing along with the waveform, instead I only see the waveform
The text was updated successfully, but these errors were encountered: