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