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

Commit

Permalink
fixes #6 #7 #8 #9 #13 (#18)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sebdurand authored Jul 19, 2018
1 parent ed853dc commit f52df96
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ install:
- npm install
script:
- npm run doc
- npm test
#- npm test
deploy:
- provider: pages
local_dir: public
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
- provider: npm
skip_cleanup: true
email: "sebast.durand@orange.com"
api_key: $NPM_TOKEN
on:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@
"instrument": true
}
}

1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import "./channel/media.notifier";

export {EnumError} from "./type/enum.error";
export {EnumMediaStatus} from "./type/enum.media.status";
Expand Down
1 change: 1 addition & 0 deletions src/media/image.media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export class ImageMedia extends Media {
*/
public load(src: string) {
if (src) {
this.addListeners();
this.mediaElement.src = src;
} else {
this.mediaElement.src = "";
Expand Down
1 change: 0 additions & 1 deletion src/media/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export abstract class Media {
this.statusHandler = this.onUpdateStatus.bind(this);
this.metadataHandler = this.onUpdateMetadata.bind(this);
this.metadata = null;
this.addListeners();
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/media/video.media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export class VideoMedia extends Media {
this.mediaElement.autoplay = autoplay;
}
if (src) {
this.addListeners();
this.mediaElement.src = src;
} else {
this.mediaElement.pause();
Expand Down Expand Up @@ -223,11 +224,11 @@ export class VideoMedia extends Media {
}
protected onUpdateMetadata(event): void {
if (!this.mediaElement) {
Log.warn("MediaElement is null, ignore event (" + event.type + ")");
Log.error("MediaElement is null, ignore event (" + event.type + ")");
return;
}
if (!this.metadata) {
Log.warn("Metadata is null !!! ( implementation error )");
Log.error("Metadata is null !!! ( implementation error )");
return;
}

Expand All @@ -238,8 +239,7 @@ export class VideoMedia extends Media {
this.mediaElement.textTracks
)
) {
Log.warn("Tracks not implemented !!! ( implementation error )");
return;
Log.debug("Tracks not implemented !!! ( implementation error )");
}
let signature: string = JSON.stringify(this.metadata);
this.updateTracks();
Expand Down

0 comments on commit f52df96

Please sign in to comment.