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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Disable docking in viewer/iOS #21020

Merged
merged 2 commits into from Feb 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions extensions/amp-video-docking/0.1/amp-video-docking.js
Expand Up @@ -386,6 +386,10 @@ export class VideoDocking {

/** @private */
registerAll_() {
if (!this.isEnabled_()) {
return;
}

const ampdoc = this.ampdoc_;

const dockableSelector =
Expand All @@ -410,6 +414,19 @@ export class VideoDocking {
});
}

/**
* @return {boolean}
* @private
*/
isEnabled_() {
// iOS is impossible in the viewer. See https://bit.ly/2BJcNjV
if (Services.platformFor(this.ampdoc_.win).isIos() &&
Services.viewerForDoc(this.ampdoc_).isEmbedded()) {
return false;
}
return true;
}

/**
* @return {?Element}
* @private
Expand Down