---
name: "getMediaUrl"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "getMediaUrl - Get actual video playback URL."
summary: "Get actual video playback URL."
---

## getMediaUrl

> [VERSION] @ray-js/lock-sdk >= 1.0.0

### Description

Get the actual playback URL of a video

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `mediaPath` | `string` | Yes | Media path |
| `mediaBucket` | `string` | Yes | Media bucket |

### Return Value

Type: `Promise<MediaUrlResult>`

Playable media URL (or the host-defined address field)

##### MediaUrlResult

| Property | Type | Description |
| --- | --- | --- |
| `mediaUrl` | `string` |  |

### Examples

#### Example

```ts
import { getMediaUrl } from '@ray-js/lock-sdk';
const url = await getMediaUrl();
```
