aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies/switcher/video.phtml
blob: ae2815ffa4defcc0291816438e4e8ca1e5ece341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<div class="container-fluid">
	<h3>Video</h3>
	<div class="formats row">

		<? foreach($room->getVideoResolutions() as $res): ?>
			<? $selection = $room->createSelectionObject($res) ?>
			<div class="col-lg-3 col-md-4 col-lg-5 col-xs-12">
				<div class="btn-group" role="group">
					<div class="btn btn-primary" disabled><?=h($selection->getDisplay())?></div>

					<? if($room->hasTranslation()): ?>

						<a href="<?=h($selection->getLink())?>" class="btn btn-primary">
							<span class="fa fa-flag-o"></span>
							Native
						</a>
            <? foreach($room->getTranslations() as $translation): ?>
						  <a href="<?=h($selection->getTranslatedLink($translation['endpoint']))?>" class="btn btn-primary">
						  	<span class="fa fa-flag"></span>
                <?=h(ucfirst($translation['label']))?>
						  </a>
		        <? endforeach ?>

					<? else: ?>

						<a href="<?=h($selection->getLink())?>" class="btn btn-primary">
							<span class="fa fa-video-camera"></span>
							Video
						</a>

					<? endif ?>
				</div>
			</div>
		<? endforeach ?>

	</div>

	<div class="notes well">
		<? include("$assemblies/desktop-player.phtml") ?>
	</div>

	<div class="directlinks">
		<? foreach(Stream::getVideoProtos() as $proto => $display): ?>
			<h3>Direct links (<?=h($display)?>)</h3>
			<div class="row">
				<? foreach($room->getVideoResolutions() as $res): ?>
					<? $selection = $room->createSelectionObject($res) ?>
					<? $switcherstream = $room->createStreamObject($res) ?>
					<div class="col-lg-3 col-md-4 col-lg-5 col-xs-12">
						<div class="btn-group" role="group" title="<?=h($switcherstream->getVideoTech($proto))?>">
							<div class="btn btn-primary" disabled><?=h($selection->getDisplay())?></div>
							<? if($room->hasTranslation()): ?>

								<a href="<?=h($room->createStreamObject($res, 'native')->getVideoUrl($proto))?>" class="btn btn-default">
									<span class="fa fa-flag-o"></span>
									Native
								</a>
				        <? foreach($room->getTranslations() as $translation): ?>
								  <a href="<?=h($room->createStreamObject($res, $translation['endpoint'])->getVideoUrl($proto))?>" class="btn btn-default">
								  	<span class="fa fa-flag"></span>
                    <?=h(ucfirst($translation['label']))?>
								  </a>
        				<? endforeach ?>

							<? else: ?>

								<a href="<?=h($switcherstream->getVideoUrl($proto))?>" class="btn btn-default">
									<span class="fa fa-video-camera"></span>
									Video
								</a>

							<? endif ?>
						</div>
					</div>
				<? endforeach ?>
			</div>
		<? endforeach ?>
	</div>
</div>