**已关闭。**此问题为not reproducible or was caused by typos。目前不接受答案。
这个问题是由一个打字错误或一个无法再重现的问题引起的。虽然类似的问题在这里可能是on-topic,但这个问题的解决方式不太可能帮助未来的读者。
1小时前关闭。
Improve this question
这是我的方法得到所有的视频
function getVideos(){
//Replace the current HTML in that div with a loading message
$('#VideoList').html('<div class="spinner-border" role="status"><span class="sr-only"> </span>');
$.getJSON(RAI, function( data ) {
//Create an array to hold all the retrieved assets
var items = [];
alert(JSON.stringify(data))
//Iterate through the returned records and build HTML, incorporating the key values of the record in the data
$.each( data, function( key, val ) {
items.push( "<hr />");
items.push("<video width='320' height='240' controls>")
items.push("<source src='"+BLOB_ACCOUNT + val["FilePath"] +"' type='video/mp4' <br/>")
items.push( "Movie title: " + val["MovieTitel"] + "<br />");
items.push( "Genre: " + val["Genre"] + "<br />");
items.push( "Uploaded by: " + val["UserId"] + "<br />");
items.push( "<hr />");
});
//Clear the assetlist div
$('#VideoList').empty();
//Append the contents of the items array to the VideoList Div
$( "<ul/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "#VideoList" );
});
}
这是在声明列表项之后由上面使用的alert方法调用的数据的格式。
(出于隐私原因,我替换了一些值,它们不是重复值)
[{"MovieId":"SOMESTRINGID","UserId":"test@email.com","MovieTitel":"test all api","Genre":"Funny","FilePath":"/video/XXXXXXXXXX"},{"MovieId":"SOMESTRINGID","UserId":"ginger@hotmail.com","MovieTitel":"Gingerites","Genre":"undefined","FilePath":"/video/XXXXXXXXXX"},
{"MovieId":"SOMESTRINGID","UserId":"test@email.com","MovieTitel":"Movie short","Genre":"undefined","FilePath":"/video/XXXXXXXXXX"},
{"MovieId":"SOMESTRINGID","UserId":"test@email.com","MovieTitel":"Movie short","Genre":"undefined","FilePath":"/video/XXXXXXXXXX"}]
1条答案
按热度按时间drnojrws1#
视频线的结束标记:〉