https://www.jwplayer.com/developers/...wnload-button/
linkteki sayfadan playerime indirme butonu eklemeye çalıştım
ama kodlar nereye eklenecek bilmiyorum
üstadlar yardım ederse çok sevinirim
jw player bilgisi olan? Yardım +R10
3
●62
- 02-12-2020, 07:04:52kod zaten paylasilmis
// Set up the playerconst playerInstance = jwplayer('player').setup({ playlist: 'https://cdn.jwplayer.com/v2/media/8L4m9FJB'}); const buttonId = 'download-video-button';const iconPath = 'assets/download.svg';const tooltipText = 'Download Video'; // Call the player's `addButton` API method to add the custom buttonplayerInstance.addButton(iconPath, tooltipText, buttonClickAction, buttonId); // This function is executed when the button is clickedfunction buttonClickAction() { const playlistItem = playerInstance.getPlaylistItem(); // Create an anchor element const anchor = document.createElement('a'); // Set the anchor's `href` attribute to the media's file URL const fileUrl = playlistItem.file; anchor.setAttribute('href', fileUrl); // set the anchor's `download` attribute to the media's file name const downloadName = playlistItem.file.split('/').pop(); anchor.setAttribute('download', downloadName); // Set the anchor's style to hide it when it's added to the page anchor.style.display = 'none'; // Add the anchor to the page document.body.appendChild(anchor); // Trigger a click event to activate the anchor anchor.click(); // Remove the anchor from the page, it's not needed anymore document.body.removeChild(anchor);} - 02-12-2020, 07:13:45Üyeliği durduruldusuleymanyaldiz adlı üyeden alıntı: mesajı görüntüle
hocam işte kodu nasıl ve nereye ekliyorum orasını bilmiyorum
player js sini sunucuya yükledim
ama bu kod nereye eklenecek onu bilmiyorum