Skip to content

Commit f7d0e35

Browse files
committed
adjusts archiving example for mediaMode change
1 parent c117669 commit f7d0e35

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sample/Archiving/web/index.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
use OpenTok\OpenTok;
1414
use OpenTok\Role;
15+
use OpenTok\MediaMode;
1516

1617
// PHP CLI webserver compatibility, serving static files
1718
$filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']);
@@ -45,7 +46,9 @@
4546
// If a sessionId has already been created, retrieve it from the cache
4647
$sessionId = $app->cache->getOrCreate('sessionId', array(), function() use ($app) {
4748
// If the sessionId hasn't been created, create it now and store it
48-
$session = $app->opentok->createSession();
49+
$session = $app->opentok->createSession(array(
50+
'mediaMode' => MediaMode::ROUTED
51+
));
4952
return $session->getSessionId();
5053
});
5154

0 commit comments

Comments
 (0)