Stream the Web Viewer Sample#
This sample is part of the Omniverse Embedded Web Viewer Example. The sample demonstrates how a front-end client can present a streamed Omniverse Kit-based application and how to send messages between them.
- To port forward the streaming service to your localhost, run: - $ kubectl --cluster <AKS-CLUSTER-NAME> --namespace omni-streaming port-forward svc/streaming 8080:80 Forwarding from 127.0.0.1:8080 -> 8080 Forwarding from [::1]:8080 -> 8080 
- In a new terminal, port forward the applications service to your localhost on a different port: - $ kubectl --cluster <AKS-CLUSTER-NAME> --namespace omni-streaming port-forward svc/applications 8081:80 Forwarding from 127.0.0.1:8080 -> 8080 Forwarding from [::1]:8080 -> 8080 
- You can confirm that both of these are available by navigating to - http://localhost:8080/docsand- http://localhost:8081/docsin your browser.- Warning - Do not close these terminals. Leave them running and forwarding to your localhost while setting up and viewing your stream. 
- Download the Web Viewer Sample repo and edit - stream.config.jsonto be a “stream” type session:- { "$comment": "source can be 'gfn', 'local' or 'stream'", "source": "stream", "stream": { "$comment": "Optional props if source is set to 'stream'.", "appServer": "http://localhost:8081", "streamServer": "http://localhost:8080" }, "gfn": { "$comment": "Required props if source is set to 'gfn'.", "catalogClientId": "", "clientId": "", "cmsId": 0 }, "local": { "$comment": "Required props if source is set to 'local'.", "server": "127.0.0.1" } } 
- Save the changes to the file. 
- Run - npm install, then- npm run dev.
- Navigate to - http://localhost:5173in your browser. When you open- http://localhost:5173, you will see that localhost:8081 and localhost:8080 are loaded as the application and streaming servers.  
- Click Next to see the application profile usd-viewer.   
- Click Next again to see the version 106.5.2.   
- Click Next to see the profile default.   
- Click Next to start the stream. Please allow time for the stream to load.   
