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

repair iframe scaling and positioning problems on Android 4.x native browsers #12

Merged
merged 1 commit into from
Dec 12, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/controller/projekktor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ projekktor = $p = function() {
iframeWidth: target.attr('width') || 0,
iframeHeight: target.attr('height') || 0
}).css({
position: 'fixed',
position: 'absolute',
display: 'block',
top: 0,
left: 0,
Expand Down Expand Up @@ -1383,7 +1383,7 @@ projekktor = $p = function() {
try {
var result = false;
if(this.config._iframe)
parent.location.host || false;
result = parent.location.host || false;
return (result===false) ? false : $(parent.window);
} catch(e) { return false; }
};
Expand Down Expand Up @@ -2968,25 +2968,25 @@ projekktor = $p = function() {
this._start = function(data) {

var ref = this,
files=[];
iframeParent = this.getIframeParent();

// load and initialize plugins
this._registerPlugins();


// set up iframe environment
if (this.config._iframe===true) {
if (this.getIframeParent()) {
this.getIframeParent().ready(function() {
ref._enterFullViewport(true);
});
} else {
ref._enterFullViewport(true);
}
if (this.config._iframe === true) {
if (iframeParent) {
iframeParent.ready(function() {
ref._enterFullViewport(true);
});
} else {
ref._enterFullViewport(true);
}
}

// cross domain
if (this.getIframeParent()===false) {
if (iframeParent===false) {
this.config._isCrossDomain = true;
}

Expand Down