Skip to content

Instantly share code, notes, and snippets.

View nikhil-arjunagi's full-sized avatar

nikhil-arjunagi

View GitHub Profile
var headersDictionaryType = environment[key].GetType().BaseType.GetInterfaces().FirstOrDefault(i => i == typeof(IDictionary<string, string[]>));
if (headersDictionaryType != null)
{
var headersDictionary = environment[key] as IDictionary<string, string[]>;
foreach (var pair in headersDictionary)
{
ThreadContext.Properties[pair.Key] = String.Join(",", pair.Value);
}
}
else
foreach (var key in _options.RequestKeys)
{
var headersDictionary = environment[key] as IDictionary<string, string[]>;
if (headersDictionary != null)
{
foreach (var pair in headersDictionary)
{
ThreadContext.Properties[pair.Key] = String.Join(",", pair.Value);
}
}
{
"SCP-1": {
"data": {
"experienceStreamReferences": [
{
"experienceId": "E-1",
"experienceStreamId": "ES-1",
"begin": 44.2,
"duration": 8.1
},
{
"map-1": {
"providerId": "CompanyX.MapProvider",
"data": {
//(experiencemetadata)
},
"experienceStreams": {
"ES-1": {
"keyframes": [
{
// Map Provider
<script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"/>
//Deep Zoom Provider
<script src="lib/seadragon-0.8.9-rin.js"></script>
// Panorama Provider
<script type="text/javascript" src="lib/pano-viewer.js"></script>
<script src="lib/jquery.pxtouch.js" type="text/javascript"></script>
// Resolve the url to player understandable version
var deepstateUrl = myrin.resolveDeepstateUrlFromAbsoluteUrl(window.location.href);
// myrin refers to the PlayerControl object
// Load the player control with the new data
myrin.load(deepstateUrl);
<script type="text/javascript">
//Note the $ here refers to jquery object which needs to be loaded explicitly in the page
$(document).ready(function () {
rin.processAll().then(function(){
var myrin = rin.getPlayerControl(document.getElementById('myrin'));
setTimeout(function () { myrin.play(); }, 1000); // play after 1 seconds
setTimeout(function () { myrin.pause(); }, 5000); // pause after 5 seconds
});
});
</script>
var p = rin.createPlayerControl(
playerElement,
{autoplay: true, controls: true, loop: true });
<div id="rinPlayer"
class="rinPlayer"
style="width: 100%;height: 100%;margin: 0;padding: 0;overflow: hidden;"
data-src="narratives/sample/narrative.js"
data-options="autoplay=false&loop=true"></div>
<body onload="rin.processAll()">
<div class="rinPlayer"
style="width:100%;height:100%;margin:0;padding:0;overflow: hidden;"
data-src="narratives/sample/narrative.js"></div>
</body>