Skip to main content
Anoosha Jogu 님이 #Salesforce Developer에 질문했습니다

The requirement is to upload videos into Salesforce files/Library and make them play on the Experience site using LWC. It is working when we store video files in Static resource using below code snippet but because of limitations we can't use it ( can't upload more than 5MB file),

import VIDEOSAMPLE from '@salesforce/resourceUrl/videoSample'

So please help me with this, How to access the playable video on the Experience site using the LWC component as we don't have permission to place the video on external hosting.

 

 

#Salesforce Developer

답변 1개
  1. 2024년 4월 10일 오후 9:52

    It is something difficult to make it works correctly.

    This forcePanda project is exactly what you are searching in an Aura version (can be converted in LWC).

     

    https://forcepanda.wordpress.com/2020/06/23/how-to-play-audio-and-videos-files-in-salesforce/  ... but read the comments below the article: many problems of security (no video displayed, blocked, etc)

     

    https://github.com/forcePanda/Lightning-Components-Repo/blob/master/MediaFile%20Player%20Component/Apex%20Classes/MediaFileComponentController.cls

     

      static string BASE_URL='/sfc/servlet.shepherd/document/download/';  // the trick difficult to find at the beginning 

     

    https://github.com/forcePanda/Lightning-Components-Repo/blob/master/MediaFile%20Player%20Component/MediaPlayerComponent/MediaPlayerComponent.cmp

0/9000