Commit 46180cb
authored
added setComponents to get access to services
I didn't find a way to get access to functions from the services (like getVideoUrl) on API/PHP level, so I added the setComponents function to define a method to call them;
```
use nystudio107\transcoder\Transcoder;
// where $video is the reference to the asset
$encodedVideoUrl = Transcoder::$plugin->get->getVideoUrl($video, []);
$encodedThumbnail = Transcoder::$plugin->get->getVideoThumbnailUrl($video, [
'width' => 800,
'height' => 450,
'timeInSecs' => 5
]);
```
This seem to work now.1 parent 3c3f703 commit 46180cb
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
0 commit comments