|
@@ -43,10 +43,7 @@ import net.polyv.live.v1.entity.channel.operate.LiveChannelAuthTokenRequest;
|
|
import net.polyv.live.v1.entity.channel.operate.LiveChannelAuthTokenResponse;
|
|
import net.polyv.live.v1.entity.channel.operate.LiveChannelAuthTokenResponse;
|
|
import net.polyv.live.v1.entity.channel.operate.LiveChannelBasicInfoRequest;
|
|
import net.polyv.live.v1.entity.channel.operate.LiveChannelBasicInfoRequest;
|
|
import net.polyv.live.v1.entity.channel.operate.LiveChannelBasicInfoResponse;
|
|
import net.polyv.live.v1.entity.channel.operate.LiveChannelBasicInfoResponse;
|
|
-import net.polyv.live.v1.entity.channel.playback.LiveChannelVideoListRequest;
|
|
|
|
-import net.polyv.live.v1.entity.channel.playback.LiveChannelVideoListResponse;
|
|
|
|
-import net.polyv.live.v1.entity.channel.playback.LiveListChannelSessionInfoRequest;
|
|
|
|
-import net.polyv.live.v1.entity.channel.playback.LiveListChannelSessionInfoResponse;
|
|
|
|
|
|
+import net.polyv.live.v1.entity.channel.playback.*;
|
|
import net.polyv.live.v1.entity.channel.viewdata.LiveListChannelViewlogRequest;
|
|
import net.polyv.live.v1.entity.channel.viewdata.LiveListChannelViewlogRequest;
|
|
import net.polyv.live.v1.entity.channel.viewdata.LiveListChannelViewlogResponse;
|
|
import net.polyv.live.v1.entity.channel.viewdata.LiveListChannelViewlogResponse;
|
|
import net.polyv.live.v1.entity.chat.*;
|
|
import net.polyv.live.v1.entity.chat.*;
|
|
@@ -192,6 +189,7 @@ public class PolyvLiveServiceImpl implements IPolyvLiveService {
|
|
//to do something ......
|
|
//to do something ......
|
|
//获取场次的详细信息
|
|
//获取场次的详细信息
|
|
if(Validator.isNotEmpty(liveChannelVideoListResponse.getChannelVedioInfos())&&liveChannelVideoListResponse.getChannelVedioInfos().size()>0){
|
|
if(Validator.isNotEmpty(liveChannelVideoListResponse.getChannelVedioInfos())&&liveChannelVideoListResponse.getChannelVedioInfos().size()>0){
|
|
|
|
+ System.out.println(liveChannelVideoListResponse.getChannelVedioInfos());
|
|
return liveChannelVideoListResponse.getChannelVedioInfos().get(0);
|
|
return liveChannelVideoListResponse.getChannelVedioInfos().get(0);
|
|
}
|
|
}
|
|
System.out.println(JSON.toJSONString(liveChannelVideoListResponse));
|
|
System.out.println(JSON.toJSONString(liveChannelVideoListResponse));
|
|
@@ -317,4 +315,40 @@ public class PolyvLiveServiceImpl implements IPolyvLiveService {
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取场次的回放VID
|
|
|
|
+ * @param bo
|
|
|
|
+ * @throws IOException
|
|
|
|
+ * @throws NoSuchAlgorithmException
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public LiveListChannelVideoLibraryResponse.ChannelVideoLibrary ListChannelVideoLibrary(PolyvLiveQueryBo bo) throws IOException, NoSuchAlgorithmException {
|
|
|
|
+ LiveListChannelVideoLibraryRequest liveListChannelVideoLibraryRequest =
|
|
|
|
+ new LiveListChannelVideoLibraryRequest();
|
|
|
|
+ LiveListChannelVideoLibraryResponse liveListChannelVideoLibraryResponse;
|
|
|
|
+ try {
|
|
|
|
+ liveListChannelVideoLibraryRequest.setChannelId(bo.getChannelId())
|
|
|
|
+ .setSessionIds(bo.getSessionId())
|
|
|
|
+ .setListType("playback");
|
|
|
|
+ liveListChannelVideoLibraryResponse = new LiveChannelPlaybackServiceImpl().listChannelVideoLibrary(
|
|
|
|
+ liveListChannelVideoLibraryRequest);
|
|
|
|
+ if (liveListChannelVideoLibraryResponse != null) {
|
|
|
|
+ if(Validator.isNotEmpty(liveListChannelVideoLibraryResponse.getContents())){
|
|
|
|
+ if(liveListChannelVideoLibraryResponse.getContents().size()>0){
|
|
|
|
+ return liveListChannelVideoLibraryResponse.getContents().get(0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //to do something ......
|
|
|
|
+ System.out.println(JSON.toJSONString(liveListChannelVideoLibraryResponse));
|
|
|
|
+ }
|
|
|
|
+ } catch (PloyvSdkException e) {
|
|
|
|
+ //参数校验不合格 或者 请求服务器端500错误,错误信息见PloyvSdkException.getMessage()
|
|
|
|
+ // 异常返回做B端异常的业务逻辑,记录log 或者 上报到ETL 或者回滚事务
|
|
|
|
+ throw e;
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw e;
|
|
|
|
+ }
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
}
|
|
}
|