hyzp_ybqx-Commit039:已经解决获取点位视频地址失败报错问题
This commit is contained in:
@@ -160,6 +160,10 @@ String urlnew =
|
||||
|
||||
bool isVideoUrl(String url, {bool showToast = false}) {
|
||||
print('url = $url');
|
||||
if (0 == url.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String prefix = url.substring(0, 4);
|
||||
List list = ['http', 'rtmp', 'rstp'];
|
||||
for (String item in list) {
|
||||
|
||||
@@ -2005,9 +2005,12 @@ Future getDwspUrlNew(
|
||||
|
||||
print('listDwspGetList2 = ${listDwspGetList2}');
|
||||
print('indexRecord = ${indexRecord}');
|
||||
String _dwspUrl = '';
|
||||
if (null != listDwspGetList2[indexRecord]['play_urlhead']) {
|
||||
String _dwspUrl =
|
||||
listDwspGetList2[indexRecord]['play_urlhead'] + listDwspGetList2[indexRecord]['video16'];
|
||||
print('开始播放:第$getCount次成功获取的视频地址');
|
||||
}
|
||||
|
||||
if (!isVideoUrl(_dwspUrl)) {
|
||||
Fluttertoast.showToast(
|
||||
@@ -2015,6 +2018,8 @@ Future getDwspUrlNew(
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.CENTER,
|
||||
);
|
||||
//正在获取点位视频标志,禁止重入
|
||||
getingDwVideo = false;
|
||||
} else {
|
||||
print('开始播放视频地址');
|
||||
playUrl(index: indexRecord, url: _dwspUrl, context: context);
|
||||
|
||||
Reference in New Issue
Block a user