Skip to content

Commit

Permalink
fix(player): autoplay error data attr should be boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Nov 14, 2023
1 parent b38f09c commit d2e1eeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/vidstack/src/components/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ export class MediaPlayer
const { error } = this.$state;
return !!error();
},
'data-autoplay-error': function (this: MediaPlayer) {
const { autoplayError } = this.$state;
return !!autoplayError();
},
};

const alias = {
Expand Down
1 change: 0 additions & 1 deletion packages/vidstack/src/core/api/media-attrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export const MEDIA_ATTRIBUTES = Symbol(__DEV__ ? 'MEDIA_ATTRIBUTES' : 0);

export const mediaAttributes: (keyof MediaState)[] = [
'autoplay',
'autoplayError',
'canFullscreen',
'canPictureInPicture',
'canLoad',
Expand Down

0 comments on commit d2e1eeb

Please sign in to comment.