I'm calling an API on button click which returns me the response in JSON format.
My code for calling API is as follows:
@foreach (var item in Model)
{
}
$(function () {
$("#btn").bind("click", function () {
var url = "http://104.211.243.204/?container=comedy-movies&blob=" + encodeURIComponent($("#itemList").val());
window.location.href = url;
});
});
Now after execution it redirects me to the url and on that window it shows me the output. Now i want to use that output in another logic. So i want to store that json response in client side into a variable without redirecting me to that url. Please help me regarding this.
This is the output from API:-
{ "url": "https://moviestarstorage.blob.core.windows.net/water/gol.mp4" }
pasting
Now i want to store this result into a variable at client side and used that variable to video tag. API returns me the result of video. Please help me regarding this. I'm using the c# Model View Controller for this
Please help me regarding this. I have search for many solutions but no one work for me . So if there is any way to do this please help me regarding that. Waiting for positive reply.
I want to display that video in my view page. json gives the url og video. So i want to store that video url at client side. and display in html so i can take that variable which holds the url of video and im pass it to the video tag.
Dharmraj ThakurPosted Mar 25, 2018, 6:57 AM
Dharmraj ThakurPosted Mar 25, 2018, 1:53 PM
Abhijeet PanpatilPosted Mar 25, 2018, 12:39 PM
Dharmraj ThakurPosted Mar 25, 2018, 11:36 AM
Abhijeet PanpatilPosted Mar 25, 2018, 7:17 AM
Abhijeet PanpatilPosted Mar 25, 2018, 6:23 AM