Start a new topic

ID3 timed metadata Removelistener 'cuechange'

I  have  a  player,   that  is  controlled by  videojs  functions 

Stop
var plr = window.videojs(vi);
plr.pause();

Play
videojs(vi,{});
videojs(vi).src(URL)

I  use  your  demo of ID3 capture/processing
http://codepen.io/Viblast/pen/dGvorN

And  i  have  a problem  --  if  you run  Stop   and  then Play  function from javascript -- you  start  to  receive one additional Cuechange  event  more for  every  Stop-Start

I thinks  that  is  because  i  need  to  remove old  event  listeners after  stopping video and  create new  one when  starting  video  again.

Problem  is  that  i  can find  appropriate  object  with .removeEventListener class..(if  it  possible)

Any  thoughts on  that  problem?


Hello,


Do you have a test page?

Seems like you do not clear the page properly. Did you try with the videojs reset() function, instead of pause()?



1 person likes this

Hello,


Did you try to define the addTrackEvent listener to be separate function and to pass it as argument to text tracks in this way:

on start: player.textTracks().addEventListener('addtrack', addTrackListener, false);

on stop: player.textTracks().removeEventListener('addtrack', addTrackListener);


Thank  you  for  reply.  Yes,  that  was  the  first  thing  i  did, Seems that  removeEventListener is  empty for  that class. it  acting,  but  dont  do  anything.

You  can  check  in  my  ticket 999 for  example, unfortunately  it  will  take  too much  time to  create  second stream with content  that  can  be public..

I  will  try  to use  debug  mode  today...

No luck....Frankly  speaking iam not  able  to  debug  such complex code... i  will  try  to create  test  stream  without private content tomorrow and  send  you  back  in ticket  999

Can  i?

http://85.17.28.76/viblast/ here  my  test  stream.

method,  not  class,  of  course.

Thank  you  for  such  useful information!
I  will  try  to prepare test  page but problem  is  that live source  of stream  is  private((

After  changing .pause  to  .reset
I  send  a  cue,  receive it,  then stop  video and  start  again(after  5sec)  then receive erorrs  in  console (they are  apear many  times)

viblast.js:1414 Uncaught TypeError: Cannot read property 'isDVR' of null

    at constructor.ViblastTech.currentTime (viblast.js:1414)

    at b.get (video.min.js:17)

and  warning

video.min.js:18
VIDEOJS: WARN: Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js

Login to post a comment