Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full screen mode problem #103

Open
tigrenok00 opened this issue Jul 17, 2022 · 0 comments
Open

Full screen mode problem #103

tigrenok00 opened this issue Jul 17, 2022 · 0 comments

Comments

@tigrenok00
Copy link

tigrenok00 commented Jul 17, 2022

Hi,

I want to enter full screen programmatically on play. the following code works, however, the full screen control button does not change when toggling full screen, and then it doesn't work when trying to exit full screen mode using the button (only ECS or mobile back will work).
Appreciate your help:

this.api.getDefaultMedia().subscriptions.play.subscribe((e) => {

      if (!this.api!.fsAPI.isFullscreen) {
        this.api!.fsAPI.toggleFullscreen();
        this.api!.fsAPI.onChangeFullscreen.emit(true);
      }
    });

The HTML is basic:


    <vg-player
      (onPlayerReady)="onPlayerReady($event)"
      [class.audio]="block.blockType == 'AUDIO'"
    >
      <video
        [vgMedia]="$any(media)"
        #media
        [id]="block.blockId"
        preload="auto"
        controls
      >
        <source [src]="block.fileUrl" [type]="block.fileType" />
      </video>
    </vg-player>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant