Skip to content

Commit

Permalink
fix(core): iOS fullscreen button
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkramny committed Jan 26, 2017
1 parent bb1c3ce commit bcedb1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/services/vg-fullscreen-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export class VgFullscreenAPI {
}
}

if (VgUtils.isiOSDevice()) {
this.polyfill = APIs.ios
}

this.isAvailable = (this.polyfill != null);
}

Expand All @@ -105,8 +109,8 @@ export class VgFullscreenAPI {
if (VgUtils.isMobileDevice()) {
// We should make fullscreen the video object if it doesn't have native fullscreen support
// Fallback! We can't set vg-player on fullscreen, only video/audio objects
if (!this.polyfill.enabled && elem === this.videogularElement) {
elem = this.medias[0];
if ((!this.polyfill.enabled && elem === this.videogularElement) || VgUtils.isiOSDevice()) {
elem = this.medias.toArray()[0].elem;
}

this.enterElementInFullScreen(elem);
Expand Down

0 comments on commit bcedb1d

Please sign in to comment.