Skip to content

Error: Uncaught TypeError: Cannot read properties of null (reading 'attributes') #1589

@heekyu-pu

Description

@heekyu-pu
  • switchMedia_(playlist, cause, delay) {
    const oldMedia = this.media();
    const oldId = oldMedia && (oldMedia.id || oldMedia.uri);
    const newId = playlist && (playlist.id || playlist.uri);
    if (oldId && oldId !== newId) {
    this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);
    const metadata = {
    renditionInfo: {
    id: newId,
    bandwidth: playlist.attributes.BANDWIDTH,
    resolution: playlist.attributes.RESOLUTION,
    codecs: playlist.attributes.CODECS
    },
    cause
    };
    this.trigger({type: 'renditionselected', metadata});
    this.tech_.trigger({type: 'usage', name: `vhs-rendition-change-${cause}`});
    }
    this.mainPlaylistLoader_.media(playlist, delay);
    }
  • console error occurs at line 439
Uncaught TypeError: Cannot read properties of null (reading 'attributes')
    at PlaylistController.switchMedia_ (video.es.js:52054:31)
    at PlaylistController.fastQualityChange_ (video.es.js:52668:10)

Reproduce step:

  • Play one video
  • After that video ended, play the second video
  • Error occurs just after video changed

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