forked from lyushine/screenOrientation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_portrait.htm
141 lines (130 loc) · 6.66 KB
/
demo_portrait.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="gbk">
<title>Document</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui"/>
<script src="http://ossweb-img.qq.com/images/spiderMediaData/codo/mediaURLData.js?_d=2232323"></script>
<style>
body,h1,h2,h3,h4,dl,dt,dd,ul,ol,li,p,video{margin:0;padding:0;}
h1,h2,h3,h4{font-size:100%}
ul,li{list-style:none}
em,i{font-style:normal}
img{border:0 none;}
input,img{vertical-align:middle}
body{
min-width:320px;
color:#fff;
font-family:Helvetica,Arial;
-webkit-text-size-adjust:none;
background-color: #fff;
font-size: 15px;
word-wrap: break-word;
word-break:keep-all;
overflow: hidden;
-webkit-user-select:none;
-webkit-touch-callout:none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-font-smoothing: antialiased;
font-weight:bold;
}
html,body,.wrap,.p{width: 100%; height:100%; overflow: hidden;}
.audio-spr{background-size: 253px 102px; background-repeat: no-repeat; background-image: url(i/audio.png);}
.p3{background: url(i/p2_bg.jpg) no-repeat; background-size: 100% 100%;}
.dish_box{width: 314px; height:314px; position: absolute; left:50%; margin-left: -160px; top:40px;}
.dish{width: 314px; height:314px; background: url(i/dish.png) no-repeat; background-size: cover; position: absolute; left:0; top:0;}
.dish-shadow{width: 335px; height:335px; background: url(i/dish_shadow.png) no-repeat; background-size: cover; position: absolute; left:-3px; top:-3px;}
.pole{width: 90px; height:192px; background: url(i/pole.png) no-repeat; position: absolute;right: 50px;top: -110px; background-size: cover; z-index: 3; -webkit-transform:translate(0,0); transform:translate(0,0);}
.avatar{width: 155px; height:155px; background: url(i/avatar.png) no-repeat; background-size: cover; position: absolute; top:50%; margin-top: -77px; margin-left: -77px; left:50%; z-index: 2;-webkit-transform:translate(0,0); transform:translate(0,0);}
.play-control{width: 300px; position: absolute; left:50%; margin-top: 469px; margin-left: -150px; height:20px;}
.play-text{font-size:18px; color:#bee0ff; text-align: center; top:406px; position: absolute; left:0; width: 100%; line-height: 36px; overflow: hidden; height:36px;}
.play-control .audio-restart{position: absolute; top:900px;}
.play-time{position: absolute; left:0; top:0; font-size:12px;}
.total-time{position: absolute; right:0; top:0; font-size:12px;}
.play-bar{height:2px; background-color: #34464f; margin-left: 50px; margin-right: 50px; margin-top: 6px; position: relative;}
.play-bar-pre{height:2px; background-color: #fff; position: absolute; top:0; left:0; z-index: 2;}
.play-bar-pre b{ width: 14px; height:14px; position: absolute;right: -8px;top: -6px;}
.play-act{position: absolute; width: 320px; left:50%; margin-left: -160px; top:500px; text-align: center;}
.audio-restart{width: 20px; height: 20px; background-position: -20px 0; position: absolute; left: 50px; top: 20px;}
.audio-pause{width: 56px; height: 56px; background-position: 0 -25px; display: inline-block;}
.audio-play{width: 56px; height:56px; background-position: -60px -25px; display: inline-block;}
.audio-close{width: 20px; height:20px; background-position: -50px 0; position: absolute; right:50px; top:20px;}
#play-text-b{position: relative; top:0; transition: top 0.6s;}
.pole{-webkit-animation: pole 0.6s linear infinite; -webkit-animation-play-state:paused; animation: pole 0.6s linear infinite; animation-play-state:paused;}
.animate_dish .dish{-webkit-animation: rotatea 0.6s linear infinite; -webkit-animation-play-state:paused; animation: rotatea 0.6s linear infinite; animation-play-state:paused;}
.p2{background: url(i/p3_bg.jpg) no-repeat; background-size: cover;}
.shares{width: 318px; height:119px; background: url(i/share.png) no-repeat; background-size: cover; position: absolute; left:50%; margin-left: -168px; text-indent: -200%; overflow: hidden; bottom:30px;}
.btn-get{width: 318px; height:81px; position: absolute; top:0; left:0;}
.btn-share{width: 212px; height:62px; position: absolute; top:67px; left:0;width: 162px; height: 41px; position: absolute; top: 81px; left: 0;}
.btn-remusic{width: 154px; height: 40px; position: absolute; right: 0; top: 81px;}
.p{display: none;}
.p1{display: block; background: url(i/p1_bg.jpg) no-repeat; background-size: 100% auto;}
.p1 video{width:100%; height:auto; position: absolute; left:0; top:0; right:0;}
.sharetip{width: 100%; height:100%; background: url(i/sharetip.png) no-repeat; background-size: 100% 100%; position: absolute; left:0; top:0; right:0; bottom:0; display: none;}
/* .p1 .video{width: 1px; height:1px; overflow: hidden;}
*/ .ctext{font-size:18px; color:#fff; position: absolute; bottom:30px; left:0; width: 100%; text-align: center; font-weight:normal; display: none;-webkit-animation: opacitya 0.6s linear infinite; animation: opacitya 0.6s linear infinite; opacity:0;}
@-webkit-keyframes rotatea {
0%{-webkit-transform: rotate(0deg);}
100%{-webkit-transform: rotate(360deg);}
}
@-webkit-keyframes pole {
0%{-webkit-transform:translate(0,0);}
100%{-webkit-transform:translate(0,10px);}
}
@-webkit-keyframes opacitya {
0%{opacity:0;}
100%{opacity:1;}
}
@keyframes rotatea {
0%{transform: rotate(0deg);}
100%{transform: rotate(360deg);}
}
@keyframes pole {
0%{transform:translate(0,0);}
100%{transform:translate(0,10px);}
}
@keyframes opacitya {
0%{opacity:0;}
100%{opacity:1;}
}
.wrap_w{-webkit-transform: rotateZ(90deg); position: relative;}
.demo{background-color: #000; width: 100px; height:100px; position: absolute; left:0; top:0;}
</style>
</head>
<body>
<div class="wrap" id="wrap">
<div class="p p1 video" style="display:block;">
<video class="video" data-index="1" id="video" x-webkit-airplay="allow" playsinline webkit-playsinline preload="auto" autoplay="true"></video>
<script>
for(var i=0;i<mediaURLData.length;i++){
if(mediaURLData[i].id == 371){
var _d = Math.random();
document.getElementById("video").setAttribute("src",mediaURLData[i].url+'&_d='+_d);
}
}
</script>
</div>
</div>
<script src="http://game.gtimg.cn/images/js/zepto/zepto.min.js"></script>
<script src="screenOrientation.js"></script>
<script>
var video = $("video");
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
if(isAndroid){
$(".ctext").show();
}else{
video[0].play();
}
var screenOrientation = new screenOrientation({
mode:'portrait',
init:function(){
// alert('初始化成功');
},
landback:function(){
alert("旋转成功");
}
});
</script>
</body>
</html>