From 22aee1df236b138474ec935dbf61a2be2e8ada66 Mon Sep 17 00:00:00 2001 From: Anssi Kostiainen Date: Mon, 30 Jun 2014 15:16:20 +0300 Subject: [PATCH] Implement exitShow(). --- requestshowmedia.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/requestshowmedia.js b/requestshowmedia.js index 1033bf4..921af0b 100644 --- a/requestshowmedia.js +++ b/requestshowmedia.js @@ -14,6 +14,10 @@ HTMLVideoElement.prototype.requestShow = function () { return requestShowMedia(this); }; +HTMLVideoElement.prototype.exitShow = function () { + video.player.close(); +}; + HTMLMediaElement.prototype.play = function (args) { if (this.dataset.secondScreenEnabled === 'true') { video.player.postMessage({ cmd: 'play'}, playerOrigin);