mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
406 stars 138 forks source link

Speed plugin not work #54

Closed joelmanx closed 7 years ago

joelmanx commented 7 years ago

my code javascript: `var player= new MediaElementPlayer('reproductor', { stretching: 'stretching', alwaysShowControls: true, defaultSpeed: 0.5, tracksText:'Acordes y Notas de la cancion', startLanguage:'en', features: ['playpause', 'current', 'progress', 'duration', 'speed', 'skipback', 'jumpforward', 'tracks', 'markers', 'volume', 'chromecast', 'ads', 'vast', 'contextmenu'],
media.addEventListener('timeupdate', function () { procesarAcorde(media.currentTime);
});

            media.addEventListener('error', function (e) {
                renderer.querySelector('.error').innerHTML = '<strong>Error</strong>: ' + e.message;
            });
        }
    });`

also add the plugin: `

<!-- Translation file for plugin (includes ALL languages available on player)-->
<script src="<?=base_url()?>mediajs/plugins/speed/speed-i18n.js"></script>`

in the console log not show mistakes , please help

rafa8626 commented 7 years ago
var player= new MediaElementPlayer('reproductor', {
  stretching: 'stretching',
  alwaysShowControls: true,
  defaultSpeed: 0.5,
  tracksText:'Acordes y Notas de la cancion',
  startLanguage:'en',
  features: ['playpause', 'current', 'progress', 'duration', 'speed', 'skipback', 'jumpforward', 'tracks',
     'markers', 'volume', 'chromecast', 'ads', 'vast', 'contextmenu'],
  success: function (media) {
     media.addEventListener('timeupdate', function () {
          procesarAcorde(media.currentTime);
     });
     media.addEventListener('error', function (e) {
    console.log(e.message);
     });
   }
});

and you MUST add the player; otherwise, it won't work

<script src="https://cdn.jsdelivr.net/mediaelement/latest/mediaelement-and-player.min.js"></script>
<script src="<?=base_url()?>mediajs/plugins/speed/speed.min.js"></script>  
<script src="<?=base_url()?>mediajs/plugins/speed/speed-i18n.js"></script>

Let me know if this worked for you

joelmanx commented 7 years ago

yes, already added, only that I do not showed the code `

<script src="<?=base_url()?>mediajs/renderers/facebook.min.js"></script>
<script src="<?=base_url()?>mediajs/renderers/soundcloud.min.js"></script>
<script src="<?=base_url()?>mediajs/renderers/twitch.min.js"></script>
<script src="<?=base_url()?>mediajs/renderers/vimeo.min.js"></script>
<script src="<?=base_url()?>mediajs/plugins/speed/speed.min.js"></script>
<script src="<?=base_url()?>mediajs/plugins/speed/speed-i18n.js"></script>
<script src="<?=base_url()?>mediajs/demo.js"></script>`

the parameter in player pluginPath: '../mediajs/plugins/', it is necessary?

rafa8626 commented 7 years ago

That parameter is only if you need to support Flash; if not, it's not really needed. If you are good with this answer, can you please star both https://github.com/mediaelement/mediaelement and https://github.com/mediaelement/mediaelement-plugins to continue improving the package and giving it more popularity? Also, tell your friends/coworkers/etc. that have a GitHub account to do the same to support the project, if you don't mind. It would be greatly appreciated it.

joelmanx commented 7 years ago

Not working yet, still with the that you said me, already added the js files of speed plugin and css style files, and added the parameter

defaultSpeed: 0.5,

I am testing in the Opera, Firefox an Chrome browsers, in lasted versions, Do you have any example? please.

I am going to promove your project, i am making a work synchronising the player video with chords of guitar using canvas html5

rafa8626 commented 7 years ago

Please share a URL so I can take a look

joelmanx commented 7 years ago

I am working in localhost mode, but I will upload in a hosting server, and I will pass the url, thanks for your help

rafa8626 commented 7 years ago

OK thanks let me know when you have the URL ready

rafa8626 commented 7 years ago

Any updates with this?

rafa8626 commented 7 years ago

Closing this issue since no answers have been posted in more than a week; if you like this to be reopened, please let us know. Thanks