This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var appView = Windows.UI.ViewManagement.ApplicationView.getForCurrentView(); | |
| // toggle the desiredBoundsMode between useVisible (10% black border) and useCoreWindow (entire screen) | |
| appView.setDesiredBoundsMode(appView.desiredBoundsMode === Windows.UI.ViewManagement.ApplicationViewBoundsMode.useCoreWindow ? | |
| Windows.UI.ViewManagement.ApplicationViewBoundsMode.useVisible : | |
| Windows.UI.ViewManagement.ApplicationViewBoundsMode.useCoreWindow); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function showToast () { | |
| console.log("yo"); | |
| var notifications = Windows.UI.Notifications, | |
| templateType = notifications.ToastTemplateType.toastImageAndText02, | |
| templateContent = notifications.ToastNotificationManager.getTemplateContent(templateType), | |
| toastMessage = templateContent.getElementsByTagName('text'), | |
| toastImage = templateContent.getElementsByTagName('image'), | |
| toastElement = templateContent.selectSingleNode('/toast'); | |
| console.log("here"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setAppBarColors(brandColorHex, brandColorInactiveHex) { | |
| // Detect if the Windows namespace exists in the global object | |
| if (typeof Windows !== 'undefined') { | |
| var brandColor = hexStrToRGBA(brandColorHex); | |
| var brandColorInactive = hexStrToRGBA(brandColorInactiveHex); | |
| // Get a reference to the App Title Bar | |
| var appTitleBar = Windows.UI.ViewManagement.ApplicationView.getForCurrentView().titleBar; | |
| var black = hexStrToRGBA('#000'); | |
| var white = hexStrToRGBA('#FFF'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (typeof Windows !== 'undefined') { | |
| // Subscribe to the Windows Activation Event | |
| Windows.UI.WebUI.WebUIApplication.addEventListener("activated", function (args) { | |
| var activation = Windows.ApplicationModel.Activation; | |
| // Check to see if the app was activated by a voice command | |
| if (args.kind === activation.ActivationKind.voiceCommand) { | |
| var speechRecognitionResult = args.result; | |
| var textSpoken = speechRecognitionResult.text; | |
| // Determine the command type {play} defined in vcd | |
| if (speechRecognitionResult.rulePath[0] === "play") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <meta name="msapplication-cortanavcd" content="http://seksenov.github.io/HWAsmtc/vcd.xml" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Platform and invoked when a user utters them to Cortana. Here’s the VCD file used in the sample: | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2"> | |
| <CommandSet xml:lang="en-us" Name="MediaSample"> | |
| <CommandPrefix>Contoso Video</CommandPrefix> | |
| <Example>Contoso video play elephants</Example> | |
| <Command Name="play"> | |
| <Example>play {message} using media sample</Example> | |
| <ListenFor RequireAppName="BeforeOrAfterPhrase">please play {streamSubject}</ListenFor> | |
| <Feedback>playing {streamSubject} with Stream Demo</Feedback> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fullScreen() { | |
| console.log("fullscreenchange"); | |
| if (typeof Windows !== 'undefined') { | |
| var view = Windows.UI.ViewManagement.ApplicationView.getForCurrentView(); | |
| if(view.IsFullScreenMode) { | |
| console.log("Exiting WinRT Fullscreen"); | |
| view.ExitFullScreenMode(); | |
| } | |
| else { | |
| console.log("Entering WinRT Fullscreen"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.addEventListener("DOMContentLoaded", function () { | |
| var videoElement = document.getElementById("mediaVideo"); | |
| videoElement.addEventListener("msfullscreenchange", fullScreen); | |
| videoElement.addEventListener("webkitfullscreenchange", fullScreen); | |
| videoElement.addEventListener("fullscreenchange", fullScreen); | |
| videoElement.addEventListener("mozfullscreenchange", fullScreen); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Extensions> | |
| <Extension Category="windows.backgroundTasks" StartPage="index.html"> | |
| <BackgroundTasks> | |
| <Task Type="audio" /> | |
| </BackgroundTasks | |
| </Extension> | |
| </Extensions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <video id="mediaVideo" src="img/Westminster_high.mp4" msAudioCategory="BackgroundCapableMedia" controls></video> |
NewerOlder