yuvarajupadhyaya

Load video

Dec 27th, 2021 (edited)
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.75 KB | None | 0 0
  1. <div class="mb-5" id="providerVideoDiv">
  2.                 <iframe id="providerVideoIframe" width="840" height="502" src="" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  3.  
  4.             </div>
  5.  
  6.    $.ajax({
  7.             type: 'get',
  8.             url: "/Home/GetProviderVideo",
  9.             data: { ProviderId:@Model.InstituteId},
  10.             success: function (resultData) {
  11.                 if (resultData.success) {
  12.                     $("#providerVideoDiv").show();
  13.                     document.getElementById('providerVideoIframe').src = resultData.url;
  14.                 }
  15.                 else {
  16.                     $("#providerVideoDiv").hide();
  17.                     console.log(resultData.message);
  18.                 }
  19.             },
  20.             error: function () {
  21.                 alert("Error Occoured");
  22.             }
  23.         });
  24.  
  25.  
  26. //if design needed
  27. <div id="video">
  28.                     <div class="rounded mb-4 bg-light">
  29.                         <div class="p-5">
  30.                             <div class="row">
  31.                                 <div class="col-lg-10 mx-auto">
  32.                                     <div class="video-container">
  33.                                         <iframe width="560" height="315" src="@Model.providerVideoDetail.VideoURL" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
  34.                                     </div>
  35.                                 </div>
  36.                             </div>
  37.                         </div>
  38.                     </div>
  39.                 </div>
  40.  
  41.  
  42.  
Add Comment
Please, Sign In to add comment