| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | private static function generateContents($representations, $basename) |
||
| 33 | { |
||
| 34 | $content[] = "#EXTM3U"; |
||
|
|
|||
| 35 | $content[] = "#EXT-X-VERSION:3"; |
||
| 36 | |||
| 37 | foreach ($representations as $representation) { |
||
| 38 | if ($representation instanceof Representation) { |
||
| 39 | $content[] = "#EXT-X-STREAM-INF:BANDWIDTH=" . $representation->getKiloBitrate() * 1024 . ",RESOLUTION=" . $representation->getResize(); |
||
| 40 | $content[] = $basename . "_" . $representation->getHeight() . "p.m3u8"; |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | return implode(PHP_EOL, $content); |
||
| 45 | } |
||
| 46 | } |