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
| var iVideo, aVideo=[], aComment;
|
| $(document).ready( onDocumentReady );
|
| function onDocumentReady() {
| aVideo=[{
| title:"美国骨科医师协会主席访谈",
| subtitle:"北京 国际骨科年会",
| info:"2015年8月1日",
| file:"interview.mp4",
| thumbnail: "interview_thumbnail.jpg",
| publish: "市场部 2015-09-18 发布",
| view:55,
| comment:10,
| like:26,
| hd:true,
| length:"00:02:05"
| },{
| title:"北美脊柱协会(NASS)介绍",
| subtitle:"North American Spine Society",
| info:"www.spine.org",
| file:"nass.mp4",
| thumbnail: "nasslogo.png",
| publish: "市场部 2015-09-19 发布",
| view:105,
| comment:12,
| like:28,
| hd:true,
| length:"00:05:29"
| },{
| title:"欧洲脊柱协会(EuroSpine)介绍",
| subtitle:"Philip Sell (主席)",
| info:"www.eurospine.org",
| file:"eurospine.mp4",
| thumbnail: "eurospine.jpg",
| publish: "市场部 2015-09-20 发布",
| view:82,
| comment:6,
| like:15,
| hd:false,
| length:"00:08:46"
| }];
| pageInit(showCatalog);
| }
|
| function showCatalog() {
| var html="";
| for (var i=0; i<aVideo.length; i++) {
| var v=aVideo[i], s="";
| s+="<img class='img_catalog_thumbnail' src='http://localhost:8080/sfez/pic/video/"+v.thumbnail+"'/>";
| s+=div("div_catalog_info",
| div("div_catalog_title", v.title)+
| div("div_catalog_subtitle", v.subtitle)+
| div("div_catalog_subtitle", v.info) );
| s+=div("div_catalog_publish", v.publish);
| s+=div("div_catalog_stats",
| div("div_catalog_view", v.view)+
| div("div_catalog_comment", v.comment)+
| div("div_catalog_like", v.like) );
| s+=div("div_catalog_res_"+(v.hd?"on":"off"), v.hd?"高清":"标清");
| s+=div("div_catalog_length", v.length);
| s+=div("div_catalog_new");
| html+=div("div_catalog_item", s, "showVideo("+i+")");
| }
| $("#div_catalog_group").html(html);
| menuSwitch("catalog");
| }
|
| function showVideo(i) {
| iVideo=i;
| $("#div_video_title").html(aVideo[i].title);
| var src="http://localhost:8080/sfez/pic/video/"+aVideo[iVideo].file;
| $("#video_main").attr("src", src);
| alertMessage("正在获取视频……请稍候");
| pageGo("video", videoPlay);
| }
|
| function videoPlay() {
| $("video").trigger("play");
| }
|
| function videoStop() {
| $("video").trigger("pause");
| }
|
|