Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

onUpdateMetadata not called when tracks not supported #9

Closed
mr-tichyt opened this issue Jun 11, 2018 · 0 comments
Closed

onUpdateMetadata not called when tracks not supported #9

mr-tichyt opened this issue Jun 11, 2018 · 0 comments

Comments

@mr-tichyt
Copy link

When the tracks are not supported in the stream the onUpdateMetadata callback exits even before it notifies about change of other metadata like title, subtitle, logo, mediaType...

video.media.ts

  protected onUpdateMetadata(event): void {
    if (!this.mediaElement) {
      Log.warn("MediaElement is null, ignore event (" + event.type + ")");
      return;
    }
    if (!this.metadata) {
      Log.warn("Metadata is null !!! ( implementation error )");
      return;
    }

    if (
      !(
        this.mediaElement.audioTracks &&
        this.mediaElement.videoTracks &&
        this.mediaElement.textTracks
      )
    ) {
      Log.warn("Tracks not implemented !!! ( implementation error )");
      return;
    }
    let signature: string = JSON.stringify(this.metadata);
    this.updateTracks();
    if (JSON.stringify(this.metadata) !== signature) {
      this.mediaChannel.onUpdateMetadata(this.getMedatadata());
    }
  }

The other metadata never gets to the app...

Thank you,
Tomas

sebdurand added a commit that referenced this issue Jul 19, 2018
* fix rollup export interface @see rollup/rollup-plugin-typescript#28

* fix attach/detach listeners after load/clear

* fix return id tracks not implemented

* fix attach/detach listeners after load/clear

* fix return id tracks not implemented

* Update package.json

* Update package.json

* add skip_cleanup: true / deploy / npm
sebdurand added a commit that referenced this issue Jul 19, 2018
* 1.0.3 (#3)

* refactoring : playbackstatus as int

* fix reply connection status

* fix getMetadata

* fix tracks

* fix format code

* 1.0.4 (#12)

* refactoring : playbackstatus as int

* fix reply connection status

* fix getMetadata

* fix tracks

* fix format code

* Fix playback status, connection status, metadata and tracks support.

* refactoring : playbackstatus as int

* fix reply connection status

* fix getMetadata

* fix tracks

* fix format code

* fix npmjs deploy

* fix npm deploy

* fixes #6 #7 #8 #9 #13  (#18)

* fix rollup export interface @see rollup/rollup-plugin-typescript#28

* fix attach/detach listeners after load/clear

* fix return id tracks not implemented

* fix attach/detach listeners after load/clear

* fix return id tracks not implemented

* add skip_cleanup: true / deploy / npm

* update protocol

* fix handle propertly transmission errors
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants