Skip to content

event.data.indexOf is not a function #17

@selected-pixel-jameson

Description

@selected-pixel-jameson

I'm creating a TimingObject instance like so:

 this.timingObject = new TIMINGSRC.TimingObject({ range: [0, 360] });
 await this.timingObject.ready
 
  this.videos.forEach((video, index) => {
    console.log('VIDEO SRC', video.src)
    if (!video.src.includes('#')) {
      this.syncs.push(MCorp.mediaSync(video, this.timingObject));
      if (index !== 0) {
        this.syncs[index].setSkew(0.09);
      }
    }
  })

However, when I play the timingObject.

this.timingObject.update({ velocity: 1.0 });

It throws this error, but the videos do play. I'm just not sure what side affects this error could be causing.

ERROR TypeError: event.data.indexOf is not a function
at Timeout.handleEvent (timingsrc-v2.js:1633:55)
at task.callback (zone.js:1596:1)
at ZoneDelegate.invokeTask (zone.js:406:1)
at Object.onInvokeTask (core.mjs:25505:1)
at ZoneDelegate.invokeTask (zone.js:405:1)
at Zone.runTask (zone.js:178:1)
at ZoneTask.invokeTask [as invoke] (zone.js:487:1)
at invokeTask (zone.js:1600:1)
at globalZoneAwareCaptureCallback (zone.js:1658:1)

Which is referencing this block of code.

```
Timeout.prototype.handleEvent = function (event) {
        if (event.source === window && event.data.indexOf("smalldelaymsg_") === 0) {
            event.stopPropagation();
            // ignore if timeout has been canceled
            var the_tid = parseInt(event.data.split("_")[1]);
            if (this._tid !== null && this._tid === the_tid) {
                this._ontimeout();
            }
        }
    };

Any help or direction in solving this would be really appreciated. 

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions