Skip to content

Commit

Permalink
Merge pull request #379 from matejkramny/master
Browse files Browse the repository at this point in the history
fix ios full screen
  • Loading branch information
Elecash authored Feb 25, 2017
2 parents abcf1ac + bcedb1d commit 8e9e557
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 8e9e557

Please sign in to comment.