How to achieve screen sharing using web browsers ? Can any one helps me to give a best solution for achieving the screen sharing.
You can use getUserMedia and set the option so that it captures screen
video: {
mandatory: {
chromeMediaSource: 'screen',
maxWidth: 1280,
maxHeight: 720
},
optional: []
}
A good example:
http://bloggeek.me/implement-screen-sharing-webrtc/
And don't forget to enable the screen capture in Chrome. Also I'm not that sure about the support on other browsers than chrome.
The screen can then be transfered to another user using RTCPeerConnection
Related
I have created a chat bot on the directline channel for all browsers, including IE11.
I need to change the font size of the user and bot messages. I have found a way to do this for all browsers bar IE11 (due to ES5).
I have tried to find ways to do this; including looking for styleOptions in the defaultStyleOptions.js
https://github.com/microsoft/BotFramework-WebChat/blob/master/packages/component/src/Styles/defaultStyleOptions.js
To which there are no options available.
There is an option, however, in the createSetStyle method of WebChat that allows the font size to be changed.
const styleSet = window.WebChat.createStyleSet({});
styleSet.textContent = {
fontSize: '24px'
};
window.WebChat.renderWebChat({
directLine: window.WebChat.createDirectLine({token: conversationToken}),
styleSet
}, document.getElementById("chatbot-display"));
Though this option does not work in IE11 (ES5)
I expect to be able to find an option which allows me to change the font size of the chat message text. i.e. fontSize: 12px.
I was unable to find a method from WebChat to do this.
However, I was able to find a work around.
.bubble {
font-size: 24px !important;
}
I'm using chrome API and Default Media Receiver. Is it possible to use some parameters to display media on a portrait screen?
Or this in the browser window:
javascript:document.body.style.setProperty("-webkit-transform", "rotate(90deg)", null);
you could do something like this:
body.portrait {
-webkit-transform: rotate(90deg);
}
and then add the portrait class to the <body> via javascript with a cast message
Default receiver maintains the aspect ratio; if you have an image that its height is more than its width, it will be shown as such. Are you experiencing something different?
I have an webapp made in sencha-touch that plays different audiofiles from URLs. It all works great, but when I add it to homescreen (on my iPhone 4s with IOS 7) everything but the audio is working...?
The way the audio is added is:
xtype: 'audio',
hidden: true,
url: '/audio/crash.mp3',
The correct audio-URL is added from store later.
I then have a button that finds the audio and sets:
audio.toggle()
Why is it not working when I add it to the homescreen? Is it a sencha or an ios7 problem?
For those who have the same problem: It didn't work with the xtype: audio. I don't know why, but i think it is a bug in ios7 or something. The sollution or "quickfix" i did was to add an audio-tag with javascript and just play that.
var a = new Audio("YOUR AUDIO URL"); a.play();
This isn't working:
How to build an chrome extension like Google Hangouts
My question is similar to this:
How do I customize the title bar of a popup in a chrome extension?
I used chrome.windows.create({...type:panel}); but its appearance is like this:
Is it possible to customize 'Normal title bar' area ?
codes here.
var createWindow = function (tab) {
if (appWindow) {
chrome.windows.remove(appWindow.id);
}
chrome.windows.create({
tabId: tab.id,
url: 'http://localhost:8080',
left: Math.round(screen.width - 300),
top: Math.round(screen.height - 500),
width: 300,
height: 500,
type: 'panel'
}, function(win) {
appWindow = win;
chrome.tabs.executeScript(appWindow.tabs[0].id, { file: './js/app_inject.js'}, function(){
// console.log('inject executed');
});
});
};
chrome.browserAction.onClicked.addListener(createWindow);
"//localhost:8080" is my local server page.
I believe your (apparently simple) question implies a couple more questions, so I'll try to split that up and address each one separately:
1. Why does my "panel" look different than Hangouts ?
Hangouts opens as a panel (so it is styled as such).
Your "panel" opens as a popup (so it is styled as such).
2. Why does my "panel" open as a popup ?
In order for an extension to be able to open panel-windows, the user must have this (experimental) feature enabled (and of course the underlying OS must support it). If panels are not enabled, all windows of type 'panel' or 'detached_panel' open as type 'popup' (documentation).
3. How can a user enable panels ?
Navigate to chrome://flags/#enable-panels and click Enable.
4. How is it possible for Hangouts to open panel-windows when the flag is disabled ?
Short answer: It is white-listed in the source code.
Longer answer: Take a look at this answer.
5. Can I style the title-bar of a popup ?
Not really. The title-bar displays (among other things) the title of the page, so you can customize that part :)
6. Do I have an alternative ?
If you absolutely need to be able to style your window, you could use a Packaged App. Apps can open frameless windows, so you can create (and style) a title-bar using HTML/CSS.
If you just want to start a hangout and copy a link to that hangout with 1 click, check out this extension (this is apparently still not an easy thing to do with Google+):
https://chrome.google.com/webstore/detail/one-click-google-hangout/aokjakdncnbbfhhammcdkbblmcglpobn
Found an interesting bug I think.
Make a simple html page with a speech to text input with x-webkit-speech, like this for exemple :
<html><body>
<input type="text" id="speech" x-webkit-speech />
</body></html>
If you open it in chrome and you click the microphone in the input, everything works Ok.
Now, create a plain extension, with "permissions": ["tabs"], and in the popup script somewhere create a panel or detached_panel window pointing to the previous html page. For exemple :
chrome.windows.create({
url: "index.html",
width: 320,
height: 240,
focused: true,
type: "detached_panel"
});
Now click on the microphone in the input : nothing happens, nada.
Is this a known bug ?
Also, I have tested with type="popup" or type="normal" and it works Ok, so the bug seems to be only on panel and detached_panel windows. Also, I have tried to put it in an iFrame inside the panel window but still doesn't work. Note that x-webkit-speech doesn't work either in the extenions bubbles.
Furthemore, I started using the experimental API proposed by Chrome, but they require the experimental api flag to be enabled, which the x-webkit-speech doesn't require.
Thanks for any clue.