Important:
This feature is currently a Private Beta service and available only under Desktop and Mobile Pro, and Enterprise Pro plans. For more details, check out our pricing page.
BrowserStack Automate enables you to upload video files to BrowserStack devices to verify various use cases, such as testing web apps and websites that require access to camera and video output, scanning QR code to your web app, testing the video recording feature, etc.
Camera Video Injection feature is currently not supported on Oppo, Vivo, Huawei, Sony, and Samsung Galaxy M32 devices.
You can upload video files in the .mp4 format only, with maximum file size of 50 MB.
Upload your video files
Prior to starting the test execution, upload the video files using media REST APIs.
curl -u "username:accesskey" -X POST "https://api-cloud.browserstack.com/automate/upload-media" -F "file=@/path/to/app/file/test.mp4"
The REST API returns a response media_url for each successful file upload.
{"media_url":"media://<hashedid>"}
Note:
This feature is currently a Private Beta service and available only under Desktop and Mobile Pro, and Enterprise Pro plans. For more details, check out our pricing page.
Inject the video file using the Automate capability
BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.
Use the capability values cameraInjection for W3C protocol and browserstack.cameraInjection for JSON wire protocol in your test scripts.