增加官方播放器
This commit is contained in:
parent
aa3995cbad
commit
ef1f4b5bc6
1
app.json
1
app.json
@ -10,6 +10,7 @@
|
|||||||
"pages/consumption/consumption",
|
"pages/consumption/consumption",
|
||||||
"pages/rechargeRecord/rechargeRecord",
|
"pages/rechargeRecord/rechargeRecord",
|
||||||
"pages/videoDetail/videoDetail",
|
"pages/videoDetail/videoDetail",
|
||||||
|
"pages/videoByte/videoByte",
|
||||||
"pages/pay/pay",
|
"pages/pay/pay",
|
||||||
"pages/history/history",
|
"pages/history/history",
|
||||||
"pages/collection/collection"
|
"pages/collection/collection"
|
||||||
|
4
app.ts
4
app.ts
@ -7,7 +7,9 @@ App({
|
|||||||
},
|
},
|
||||||
globalData: {
|
globalData: {
|
||||||
loginPromise: null,
|
loginPromise: null,
|
||||||
statusBarHeight: 0
|
statusBarHeight: 0,
|
||||||
|
canUsePlayletExtension: tt.canIUse('PlayletExtension'),
|
||||||
|
useVideoByte: true,
|
||||||
},
|
},
|
||||||
onLaunch() {
|
onLaunch() {
|
||||||
const loginPromise: any = new Promise((resolve: any) => {
|
const loginPromise: any = new Promise((resolve: any) => {
|
||||||
|
@ -13,7 +13,9 @@ Page({
|
|||||||
newModule: [],
|
newModule: [],
|
||||||
bookcase: [],
|
bookcase: [],
|
||||||
bookId: '',
|
bookId: '',
|
||||||
subscribeType: 1
|
subscribeType: 1,
|
||||||
|
canUsePlayletExtension: getApp().globalData.canUsePlayletExtension,
|
||||||
|
useVideoByte: getApp().globalData.useVideoByte,
|
||||||
},
|
},
|
||||||
onLoad: function () {
|
onLoad: function () {
|
||||||
|
|
||||||
@ -120,9 +122,20 @@ Page({
|
|||||||
},
|
},
|
||||||
toPathVideo(ev: any) {
|
toPathVideo(ev: any) {
|
||||||
const sid = ev.currentTarget.dataset.sid;
|
const sid = ev.currentTarget.dataset.sid;
|
||||||
|
const album_id = ev.currentTarget.dataset.item.album_id;
|
||||||
|
const episode_id = ev.currentTarget.dataset.item.episode_id;
|
||||||
|
let url = `/pages/videoDetail/videoDetail?sid=${sid}`;
|
||||||
|
if(this.data.canUsePlayletExtension&&this.data.useVideoByte){
|
||||||
|
url = `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${album_id}&tt_episode_id=${episode_id}&sid=${sid}`;
|
||||||
|
}
|
||||||
|
console.log("url",url);
|
||||||
tt.navigateTo({
|
tt.navigateTo({
|
||||||
url: `/pages/videoDetail/videoDetail?sid=${sid}`,
|
url: url,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// tt.navigateTo({
|
||||||
|
// url: `/pages/videoDetail/videoDetail?sid=${sid}`,
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
const page = this.data.page;
|
const page = this.data.page;
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
bindchange="handelSwiperChange" autoplay="{{true}}" interval="{{2000}}">
|
bindchange="handelSwiperChange" autoplay="{{true}}" interval="{{2000}}">
|
||||||
<block tt:for="{{carouselChart}}">
|
<block tt:for="{{carouselChart}}">
|
||||||
<swiper-item class="_home_swi_item" tt:key="{{item.bookid}}" data-sid="{{item.bookid}}"
|
<swiper-item class="_home_swi_item" tt:key="{{item.bookid}}" data-sid="{{item.bookid}}"
|
||||||
catchtap="toPathVideo">
|
catchtap="toPathVideo" data-item="{{item}}" >
|
||||||
<view class="_home_swi_it_ppp {{swiperCurrent == index ? '_wk_it_op_ac' :''}}">
|
<view class="_home_swi_it_ppp {{swiperCurrent == index ? '_wk_it_op_ac' :''}}">
|
||||||
<view class="_home_swi_it_warp " catchtap="toPathVideo" data-sid="{{item.bookid}}">
|
<view class="_home_swi_it_warp " catchtap="toPathVideo" data-item="{{item}}" data-sid="{{item.bookid}}">
|
||||||
<image src="{{item.cover}}" class="_home_swi_it_wa_img" mode="aspectFill"
|
<image src="{{item.cover}}" class="_home_swi_it_wa_img" mode="aspectFill"
|
||||||
lazy-load="{{true}}"></image>
|
lazy-load="{{true}}"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<view class="_mo_1_bo_list">
|
<view class="_mo_1_bo_list">
|
||||||
<block tt:for="{{boutique}}">
|
<block tt:for="{{boutique}}">
|
||||||
<view class="_mo_1__li_warp" tt:key="{{item.id}}">
|
<view class="_mo_1__li_warp" tt:key="{{item.id}}">
|
||||||
<view class="_mo_1__li_wa_item" data-sid="{{item.id}}" bindtap="toPathVideo">
|
<view class="_mo_1__li_wa_item" data-sid="{{item.id}}" data-item="{{item}}" bindtap="toPathVideo">
|
||||||
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}"></image>
|
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="_mo_3_con_li_it_wa_title">
|
<view class="_mo_3_con_li_it_wa_title">
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<scroll-view class="_mo_2_scroll_view_H" scroll-x="true" style="width: 100%" scroll-left="{{0}}">
|
<scroll-view class="_mo_2_scroll_view_H" scroll-x="true" style="width: 100%" scroll-left="{{0}}">
|
||||||
<block tt:for="{{bookcase}}">
|
<block tt:for="{{bookcase}}">
|
||||||
<view class="_mo_2_scr_con_i" tt:key="{{item.id}}">
|
<view class="_mo_2_scr_con_i" tt:key="{{item.id}}">
|
||||||
<view class="_mo_2_scr__i_k" data-sid="{{item.id}}" bindtap="toPathVideo">
|
<view class="_mo_2_scr__i_k" data-sid="{{item.id}}" data-item="{{item}}" bindtap="toPathVideo">
|
||||||
<view class="_mo_2_scr_warp">
|
<view class="_mo_2_scr_warp">
|
||||||
<view class="_mo_2_scr_wa_img">
|
<view class="_mo_2_scr_wa_img">
|
||||||
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}">
|
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}">
|
||||||
@ -100,7 +100,7 @@
|
|||||||
<view class="_mo_3_con_list">
|
<view class="_mo_3_con_list">
|
||||||
<block tt:for="{{optimalSelection}}">
|
<block tt:for="{{optimalSelection}}">
|
||||||
<view class="_mo_3_con_li_item" tt:key="{{item.id}}">
|
<view class="_mo_3_con_li_item" tt:key="{{item.id}}">
|
||||||
<view class="_mo_3_con_li_it_warp" data-sid="{{item.id}}" bindtap="toPathVideo">
|
<view class="_mo_3_con_li_it_warp" data-sid="{{item.id}}" data-item="{{item}}" bindtap="toPathVideo">
|
||||||
<view class="_mo_3_con_li_it_wa_cover">
|
<view class="_mo_3_con_li_it_wa_cover">
|
||||||
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}">
|
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}">
|
||||||
</image>
|
</image>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<view class="_mo_4_con_list">
|
<view class="_mo_4_con_list">
|
||||||
<block tt:for="{{classical}}">
|
<block tt:for="{{classical}}">
|
||||||
<view class="_mo_4_con_li_item" tt:key="{{item.id}}">
|
<view class="_mo_4_con_li_item" tt:key="{{item.id}}">
|
||||||
<view class="_mo_4_con_li_it_warp" data-sid="{{item.id}}" bindtap="toPathVideo">
|
<view class="_mo_4_con_li_it_warp" data-sid="{{item.id}}" data-item="{{item}}" bindtap="toPathVideo">
|
||||||
<view class="_mo_4_con_li_it_wa_cover">
|
<view class="_mo_4_con_li_it_wa_cover">
|
||||||
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}">
|
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}">
|
||||||
</image>
|
</image>
|
||||||
@ -170,7 +170,7 @@
|
|||||||
<view class="_mo_5_content">
|
<view class="_mo_5_content">
|
||||||
<view class="_mo_5_con_list">
|
<view class="_mo_5_con_list">
|
||||||
<block tt:for="{{newModule}}">
|
<block tt:for="{{newModule}}">
|
||||||
<view class="_mo_5_con_li_item" tt:key="{{item.id}}" data-sid="{{item.id}}" catchtap="toPathVideo">
|
<view class="_mo_5_con_li_item" tt:key="{{item.id}}" data-sid="{{item.id}}" data-item="{{item}}" catchtap="toPathVideo">
|
||||||
<view class="_mo_5_con_li_it_left">
|
<view class="_mo_5_con_li_it_left">
|
||||||
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}"></image>
|
<image src="{{item.cover}}" class="__wa_img" mode="aspectFill" lazy-load="{{true}}"></image>
|
||||||
<view class="_mo_5_con_li_it_le_tag">
|
<view class="_mo_5_con_li_it_le_tag">
|
||||||
|
@ -13,6 +13,8 @@ Page({
|
|||||||
videoErrorText: '',
|
videoErrorText: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
statusBarHeight: getApp().globalData.statusBarHeight,
|
statusBarHeight: getApp().globalData.statusBarHeight,
|
||||||
|
canUsePlayletExtension: getApp().globalData.canUsePlayletExtension,
|
||||||
|
useVideoByte: getApp().globalData.useVideoByte,
|
||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -150,8 +152,15 @@ Page({
|
|||||||
|
|
||||||
toPathVideo(ev: any) {
|
toPathVideo(ev: any) {
|
||||||
const sid = ev.currentTarget.dataset.sid;
|
const sid = ev.currentTarget.dataset.sid;
|
||||||
|
const album_id = ev.currentTarget.dataset.item.videoinfo.album_id;
|
||||||
|
const episode_id = ev.currentTarget.dataset.item.videoinfo.episode_id;
|
||||||
|
let url = `/pages/videoDetail/videoDetail?sid=${sid}`;
|
||||||
|
if(this.data.canUsePlayletExtension&&this.data.useVideoByte){
|
||||||
|
url = `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${album_id}&tt_episode_id=${episode_id}&sid=${sid}`;
|
||||||
|
}
|
||||||
|
console.log("url",url);
|
||||||
tt.navigateTo({
|
tt.navigateTo({
|
||||||
url: `/pages/videoDetail/videoDetail?sid=${sid}`,
|
url: url,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handelCollection(ev: any) {
|
handelCollection(ev: any) {
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
<image src="{{videoInfo.cover}}" mode="aspectFill" class="__wa_img_no_radius"></image>
|
<image src="{{videoInfo.cover}}" mode="aspectFill" class="__wa_img_no_radius"></image>
|
||||||
</view>
|
</view>
|
||||||
</block> -->
|
</block> -->
|
||||||
<view class="_m_v_jw_v_to_path" data-sid="{{item.id}}" catchtap="toPathVideo">
|
<view class="_m_v_jw_v_to_path" data-sid="{{item.id}}" data-item="{{item}}" catchtap="toPathVideo">
|
||||||
<text class="_m_v_jw_v_to_p_text">进入观看</text>
|
<text class="_m_v_jw_v_to_p_text">进入观看</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="_m_v_w_v_operate_l">
|
<view class="_m_v_w_v_operate_l">
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
<swiper bindchange="handelSeiperChange" class="_vv_de_swiper" vertical="{{true}}" duration="{{100}}"
|
<swiper bindchange="handelSeiperChange" class="_vv_de_swiper" vertical="{{true}}" duration="{{100}}"
|
||||||
easing-function="easeInOutCubic" current="{{videoPlayerCurrent}}">
|
easing-function="easeInOutCubic" current="{{videoPlayerCurrent}}">
|
||||||
<!-- tt:for="{{batchList}}" tt:if="{{false}}"-->
|
<!-- tt:for="{{batchList}}" tt:if="{{false}}"-->
|
||||||
|
<!-- 视频数据-->
|
||||||
<block tt:for="{{batchList}}">
|
<block tt:for="{{batchList}}">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<!-- || index == videoPlayerCurrent - 1 || index == videoPlayerCurrent + 1 -->
|
<!-- || index == videoPlayerCurrent - 1 || index == videoPlayerCurrent + 1 -->
|
||||||
<block tt:if="{{index == videoPlayerCurrent }}">
|
<block tt:if="{{index == videoPlayerCurrent }}">
|
||||||
<view class="_swiper_item_warp">
|
<view class="_swiper_item_warp">
|
||||||
|
<!-- 播放器-->
|
||||||
<block tt:if="{{videoInfo.chackpay == 1}}">
|
<block tt:if="{{videoInfo.chackpay == 1}}">
|
||||||
<block tt:if="{{videoCanIUse}}">
|
<block tt:if="{{videoCanIUse}}">
|
||||||
<!-- videoPlayerCurrent == index -->
|
<!-- videoPlayerCurrent == index -->
|
||||||
@ -64,6 +66,7 @@
|
|||||||
</video>
|
</video>
|
||||||
</block>
|
</block>
|
||||||
</block>
|
</block>
|
||||||
|
<!-- 广告层-->
|
||||||
<block tt:else>
|
<block tt:else>
|
||||||
<view class="_k_l_unlock">
|
<view class="_k_l_unlock">
|
||||||
<view class="_m_v_w_it_ma_cover">
|
<view class="_m_v_w_it_ma_cover">
|
||||||
@ -108,6 +111,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<!-- 操作-->
|
||||||
<view class="_m_v_w_v_operate_l">
|
<view class="_m_v_w_v_operate_l">
|
||||||
<view class="_m_vv_oper_l_col_w" data-id="{{videoInfo.sid}}" catchtap="handelCollection">
|
<view class="_m_vv_oper_l_col_w" data-id="{{videoInfo.sid}}" catchtap="handelCollection">
|
||||||
<view class="_m_vv_oper_l_collect">
|
<view class="_m_vv_oper_l_collect">
|
||||||
@ -141,6 +145,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 视频信息显示-->
|
||||||
<view class="_m_v_ww_info_vo">
|
<view class="_m_v_ww_info_vo">
|
||||||
<view class="_m_v_ww_in_vooo_title">
|
<view class="_m_v_ww_in_vooo_title">
|
||||||
<!-- {{videoPlayerCurrent}}{{index}}--{{item.id}} -->
|
<!-- {{videoPlayerCurrent}}{{index}}--{{item.id}} -->
|
||||||
@ -158,6 +163,7 @@
|
|||||||
</block>
|
</block>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
|
<!-- 完结推荐-->
|
||||||
<block tt:if="{{nextbatchList.length}}">
|
<block tt:if="{{nextbatchList.length}}">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="_play_drama_complete">
|
<view class="_play_drama_complete">
|
||||||
@ -196,7 +202,7 @@
|
|||||||
</block>
|
</block>
|
||||||
|
|
||||||
</swiper>
|
</swiper>
|
||||||
|
<!-- 选集面板-->
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="_vv_det_anthology_mask" tt:if="{{anthologyFlag}}">
|
<view class="_vv_det_anthology_mask" tt:if="{{anthologyFlag}}">
|
||||||
</view>
|
</view>
|
||||||
@ -251,7 +257,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 收藏弹窗-->
|
||||||
<my-modal class="_m_modal_html" tt:ref="myModalRef" contentText="是否取消收藏?" cancelText="否" confirmText="是"
|
<my-modal class="_m_modal_html" tt:ref="myModalRef" contentText="是否取消收藏?" cancelText="否" confirmText="是"
|
||||||
bind:handelConfirm="modalConfirm" bind:handelCancel="modalCancel" />
|
bind:handelConfirm="modalConfirm" bind:handelCancel="modalCancel" />
|
||||||
</view>
|
</view>
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"condition": {
|
"condition": {
|
||||||
"miniprogram": {
|
"miniprogram": {
|
||||||
"current": -1,
|
"current": 1732184262860,
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"id": 1715845062520,
|
"id": 1715845062520,
|
||||||
@ -112,8 +112,19 @@
|
|||||||
"launchFrom": "scan",
|
"launchFrom": "scan",
|
||||||
"location": "qr_code",
|
"location": "qr_code",
|
||||||
"mockUpdateType": "Noupdate"
|
"mockUpdateType": "Noupdate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1732184262860,
|
||||||
|
"name": "pages/videoByte/videoByte",
|
||||||
|
"pathName": "pages/videoByte/videoByte",
|
||||||
|
"query": "sid=265&id=14265&tid=1234&union_tid=15875&tt_album_id=7336037389002867237&tt_episode_id=7336037720098783759",
|
||||||
|
"scene": "011002",
|
||||||
|
"launchFrom": "search_suggest_list_top",
|
||||||
|
"location": "",
|
||||||
|
"mockUpdateType": "Noupdate",
|
||||||
|
"addType": "manual"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user