2021-01-25 18:09:30 +00:00
|
|
|
var baseURL = location.hash ? (location.toString().substr(0, location.toString().length - location.hash.length)) : location;
|
|
|
|
|
2021-02-04 00:13:55 +00:00
|
|
|
var CineraProps = {
|
2018-01-17 20:15:00 +00:00
|
|
|
C: null,
|
|
|
|
V: views.REGULAR,
|
|
|
|
Z: null,
|
|
|
|
X: null,
|
|
|
|
Y: null,
|
|
|
|
W: null,
|
2018-02-23 23:36:42 +00:00
|
|
|
mW: null,
|
2018-01-17 20:15:00 +00:00
|
|
|
H: null,
|
2018-02-23 23:36:42 +00:00
|
|
|
mH: null,
|
2019-03-07 20:16:27 +00:00
|
|
|
P: null,
|
2021-01-25 18:09:30 +00:00
|
|
|
Display: null,
|
|
|
|
FlexDirection: null,
|
|
|
|
JustifyContent: null,
|
2021-02-04 00:13:55 +00:00
|
|
|
O: null,
|
2021-02-10 22:41:46 +00:00
|
|
|
IsMobile: IsMobile(),
|
2021-01-25 18:09:30 +00:00
|
|
|
ScrollX: null,
|
|
|
|
ScrollY: null,
|
2021-06-23 14:13:41 +00:00
|
|
|
VODPlatform: null,
|
2018-01-17 20:15:00 +00:00
|
|
|
};
|
2021-02-12 23:48:02 +00:00
|
|
|
CineraProps.O = GetRealOrientation(orientations.LANDSCAPE_LEFT, CineraProps.IsMobile);
|
2018-01-17 20:15:00 +00:00
|
|
|
|
2021-01-25 18:09:30 +00:00
|
|
|
var MobileCineraContentRuleSelector = ".cinera.mobile .cineraPlayerContainer .markers_container > .markers .marker .cineraContent";
|
|
|
|
var MobileCineraContentRule = GetOrSetRule(MobileCineraContentRuleSelector);
|
|
|
|
|
2021-01-27 21:58:56 +00:00
|
|
|
var MenuContainerRuleSelector = ".cineraMenus > .menu .quotes_container, .cineraMenus > .menu .references_container, .cineraMenus > .menu .filter_container, .cineraMenus > .menu .views_container, .cineraMenus > .menu .link_container, .cineraMenus > .menu .credits_container";
|
|
|
|
var MenuContainerRule = GetOrSetRule(MenuContainerRuleSelector);
|
|
|
|
|
2023-03-18 01:27:05 +00:00
|
|
|
var cinera = document.querySelector(".cinera");
|
|
|
|
var player = new Player(cinera, onRefChanged);
|
2021-02-12 23:48:02 +00:00
|
|
|
|
2021-02-04 00:13:55 +00:00
|
|
|
window.addEventListener("resize", function() {
|
|
|
|
if(CineraProps.IsMobile)
|
|
|
|
{
|
2023-03-18 01:27:05 +00:00
|
|
|
setTimeout(DelayedUpdateSize, 512, player);
|
2021-02-04 00:13:55 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
player.updateSize();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2023-03-21 19:34:24 +00:00
|
|
|
screen.orientation.onchange = function() {
|
2021-02-04 00:13:55 +00:00
|
|
|
if(CineraProps.IsMobile)
|
|
|
|
{
|
2023-03-18 01:27:05 +00:00
|
|
|
setTimeout(DelayedUpdateSize, 512, player);
|
2021-02-04 00:13:55 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
player.updateSize();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-11-11 00:34:47 +00:00
|
|
|
document.addEventListener("keydown", function(ev) {
|
|
|
|
var key = ev.key;
|
|
|
|
if(ev.getModifierState("Shift") && key == " ")
|
|
|
|
{
|
|
|
|
key = "capitalSpace";
|
|
|
|
}
|
|
|
|
|
2023-03-18 01:27:05 +00:00
|
|
|
if(!ev.getModifierState("Control") && player.handleKey(key) == true && player.MenusFocused.Item)
|
2017-11-11 00:34:47 +00:00
|
|
|
{
|
|
|
|
ev.preventDefault();
|
|
|
|
}
|
|
|
|
});
|