| Conditions | 4 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function getItemLinks() |
||
| 18 | { |
||
| 19 | $items = array(); |
||
| 20 | |||
| 21 | // An item may consist of multiple items, a file may consist of multiple |
||
| 22 | // links |
||
| 23 | foreach ($this->getStreamableItems() as $mediaItem) |
||
|
|
|||
| 24 | { |
||
| 25 | $name = $mediaItem->getDisplayName(); |
||
| 26 | |||
| 27 | // Get the links to the media. We have to omit credentials from the |
||
| 28 | // URLs if the user is using Internet Explorer since it won't |
||
| 29 | // follow such links |
||
| 30 | $links = VideoLibrary::getVideoLinks($mediaItem->file, Browser::isInternetExplorer()); |
||
| 31 | $linkCount = count($links); |
||
| 32 | |||
| 33 | foreach ($links as $k=> $link) |
||
| 34 | { |
||
| 35 | $label = $linkCount > 1 ? $name.' (#'.++$k.')' : $name; |
||
| 36 | $items[] = new ItemLink($label, $link, $mediaItem); |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | return $items; |
||
| 41 | } |
||
| 44 |