Skip to content

Commit

Permalink
fix(player): view type not set when initial src is hls
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Oct 1, 2023
1 parent dc5dd10 commit a16e644
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vidstack/src/core/state/media-state-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ export class MediaStateManager extends MediaPlayerController {
const providedViewType = this.$state.providedViewType(),
currentViewType = providedViewType === 'unknown' ? event.detail : providedViewType;

this.el?.setAttribute('data-view-type', currentViewType);

if (viewType !== currentViewType) {
this.el?.setAttribute('data-view-type', currentViewType);
if (__SERVER__) {
this.$state.inferredViewType.set(currentViewType);
} else {
Expand Down

0 comments on commit a16e644

Please sign in to comment.