投稿時間:2023-04-07 21:14:49 RSSフィード2023-04-07 21:00 分まとめ(18件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita Stable-diffusion basil mix google colabo エラー対処 https://qiita.com/TaichiEndoh/items/fc8b9efece77d2baba4f basilmix 2023-04-07 20:39:01
python Pythonタグが付けられた新着投稿 - Qiita 【随時更新】主要プログラミング言語8種チートシート https://qiita.com/mossan_hoshi/items/0bd564900acfd32557d1 haskellccbashpowershell 2023-04-07 20:30:39
js JavaScriptタグが付けられた新着投稿 - Qiita 【随時更新】主要プログラミング言語8種チートシート https://qiita.com/mossan_hoshi/items/0bd564900acfd32557d1 haskellccbashpowershell 2023-04-07 20:30:39
js JavaScriptタグが付けられた新着投稿 - Qiita .split(" ").map(Number)について https://qiita.com/conkon326/items/5281aaac4a255cfe5ea2 javascript 2023-04-07 20:10:01
Docker dockerタグが付けられた新着投稿 - Qiita コンテナでsupervisor使用時に「INFO reaped unknown pid XXX (terminated by SIGKILL)」 で困っている場合 https://qiita.com/MatchaDev/items/6d8598e7fd02e8a814ab pidterminatedbysigkill 2023-04-07 20:39:35
Azure Azureタグが付けられた新着投稿 - Qiita Azure Blob ストレージにアップロードされるマルウェア感染した Blob データを Microsoft Defender for Storage アンチマルウェアスキャンを行って隔離する https://qiita.com/hisnakad/items/0f577fa1e712fb0d7ed2 antimalwarescanning 2023-04-07 20:10:38
技術ブログ Developers.IO Alteryxの年次カンファレンスイベント『Inspire 2023』に参加してきます – Alteyrx Inspire 2023 #alteryx23 https://dev.classmethod.jp/articles/alteryx-inspire-2023-report-introduction/ alteryx 2023-04-07 11:03:23
海外TECH Ars Technica Rocket Report: Starship gets a tentative launch date; China tests ocean landing https://arstechnica.com/?p=1929603 human 2023-04-07 11:15:15
海外TECH DEV Community Broadcasting Interactive Web Based Gaming Live Streams with Amazon IVS https://dev.to/aws/broadcasting-interactive-web-based-gaming-live-streams-with-amazon-ivs-20ek Broadcasting Interactive Web Based Gaming Live Streams with Amazon IVSI ve blogged quite a bit about the Amazon Interactive Video Service Amazon IVS Web Broadcast SDK We ve learned about the basics how to use the SDK to stream pre recorded videos how to add screen sharing and overlays and even looked at using it to create a Lofi radio station The Web Broadcaster SDK is a game changer that gives developers the ability to integrate the broadcast experience directly into their streaming applications instead of directing their users to use third party desktop streaming software In this post we ll look at another exciting possible use case of the Web Broadcast SDK streaming browser based games directly to an Amazon IVS channel It s really quite easy to do and we ll take it a step further by creating an interactive experience that allows live stream viewers to control the gameplay akin to TwitchPlaysPokemon Streaming a Browser Based Game Directly From the BrowserFor this post I ll assume that you re already familiar with Amazon IVS and have already configured a live streaming channel If you re new to Amazon IVS check out the blog series Getting Started with Amazon IVS specifically the very first post Optionally you could also refer to the user guide which is a great resource for learning how to develop live streaming applications with Amazon IVS Since I m not a game developer I decided to add live streaming to a few existing open source browser based games pacman canvas and Astray Since both of these games utilize lt canvas gt for gameplay it will be easy to obtain a MediaStream from them will be the source for our live stream video input pacman canvasFor the first demo I cloned the pacman canvas repo to my local machine and took a look at the code Initializing the Broadcast ClientThe pacman canvas game uses jQuery so I added a call to an initBroadcast method to the end of the existing DOM ready handler let broadcastClient let isBroadcasting false document ready function game logic initBroadcast In my initBroadcast method I create an instance of the AmazonIVSBroadcastClient docs passing it the Ingest endpoint from my Amazon IVS channel broadcastClient IVSBroadcastClient create streamConfig IVSBroadcastClient STANDARD LANDSCAPE ingestEndpoint config ingestEndpoint Next to add the gameplay to the client I grabbed a reference to the lt canvas gt element used by the game and called addVideoInputDevice docs on the broadcastClient const game document getElementById myCanvas broadcastClient addVideoInputDevice game captureStream game track index Finally to start the broadcast I call startBroadcast and pass it the Stream key from my channel broadcastClient startBroadcast config streamKey then gt isBroadcasting true console log online catch error gt isBroadcasting false console error error The game uses a few lt audio gt tags for sound effects and calls the following function as necessary var Sound Sound play function sound if game soundfx var audio document getElementById sound audio null audio play console log sound not found To add the game audio to my stream I modified it to call addAudioInputDevice docs var Sound Sound play function sound if game soundfx var audio document getElementById sound audio null audio play console log sound not found var trackLabel sound audio track new Date getTime audio addEventListener playing evt gt if broadcastClient getAudioInputDevice trackLabel broadcastClient addAudioInputDevice audio captureStream trackLabel And that s it The gameplay stream will be broadcast whenever the startBroadcast method is called so we could attach that to a button click handler or call it from the newGame method of the existing game If we wanted to we could also add a webcam to the stream and even size and position the webcam as an overlay see VideoComposition docs for more info Playing Back the Live Stream in a BrowserFor playback I added a simple HTML page that includes and utilizes the Amazon IVS Player SDK lt script src gt lt script gt lt script gt document addEventListener DOMContentLoaded gt const videoPlayer document getElementById video player const streamUrl CHANNEL PLAYBACK URL const ivsPlayer IVSPlayer create ivsPlayer attachHTMLVideoElement videoPlayer ivsPlayer load streamUrl ivsPlayer play lt script gt lt body gt lt video id video player gt lt body gt Here s how everything looks at this point On the left side is the broadcast gamer view and on the right is the playback viewer view Adding Timed MetadataAs you can see in the Gif above the score level and lives data is not included in the live stream This is because the game developer did not include those elements in the gameplay lt canvas gt If we wanted to we could render these as overlays in the playback view by publishing them with timed metadata In my demo I modified the Score function of pacman canvas to publish the score as timed metadata on my live stream by calling an AWS Lambda function that I ve previously created for this channel const publishMetadata async meta gt await fetch lambda url send metadata method POST headers Accept application json Content Type application json body JSON stringify meta function Score this score this set function i this score i this add function i this score i publishMetadata metadata JSON stringify score this score this refresh function h h html Score this score Note Be careful publishing metadata too frequently to avoid exceeding the Amazon IVS service quotas You may need to throttle or batch metadata publishing to avoid exceeding the quota Adding Interactivity to a Browser Based Game Live StreamNow let s take a look at how we might create an interactive browser based game that can be controlled by live stream viewers For this I chose Astray a simple game that requires the player to navigate a ball through a maze I added the Web Broadcast client just as i did with pacman canvas above and decided to use Amazon IVS chat to receive the gameplay control commands from the viewer Adding ChatWe ve previously looked at how to add chat to your live streaming application with Amazon IVS chat To use chat for game interactivity we ll configure a chat experience just like we usually do but in the chat connection s message handler we ll check the message content for the terms left right up and down to control the ball movement on the broadcaster side const chatConnection new WebSocket wss edge ivschat us east amazonaws com token chatConnection onmessage event gt const data JSON parse event data const chatEl document getElementById chat if data Type MESSAGE const direction data Content toLowerCase if left up right down indexOf direction gt moveBall direction render message to chat div If I find one of the directional commands in the incoming message I call moveBall which will simulate a key press on the broadcaster side to move the ball in the game const moveBall direction gt let keyCode let keyCodes left up right down const keyDown new KeyboardEvent keydown keyCode keyCodes direction const keyUp new KeyboardEvent keyup keyCode keyCodes direction document dispatchEvent keyDown setTimeout gt document dispatchEvent keyUp Note There s a minor catch to this approach Because Astray uses requestAnimationFrame the broadcaster s game tab must be active visible tab at all times since requestAnimationFrame pauses when the tab is not visible to improve performance and battery life Here s how Astray looks when controlled by the viewer There s a slight delay due to the stream latency but the potential to give viewers control of the live stream gameplay is intriguing and filled with potential SummaryIn this post we learned how to integrate the Amazon IVS Web Broadcast SDK into a browser based game to give players the ability to live stream gameplay directly to an Amazon IVS live streaming channel We also learned how to add interactivity to the experience to give stream viewers the ability to directly affect the gameplay If you d like to learn more about Amazon IVS check out the Getting Started with Amazon IVS blog post series here on dev to 2023-04-07 11:31:44
海外TECH DEV Community Registry Pattern -Revolutionize Your Object Creation and Management. ( LMS as a case study) https://dev.to/walosha/registry-pattern-revolutionize-your-object-creation-and-management-lms-as-a-case-study-58km Registry Pattern Revolutionize Your Object Creation and Management LMS as a case study The Registry pattern is a design pattern that provides a centralized location for managing and creating instances of objects It is useful when you have multiple instances of related objects that need to be created and managed and can simplify object creation and management by providing a single point of access for creating and retrieving instances of those objects In other way a registry object maintains a collection of named objects and provides methods for registering and retrieving those objects This can improve performance by allowing the system to reuse existing objects rather than creating new ones each time they are needed It also makes it easy to add new types of objects to the system without modifying existing code Learning Management System LMS Let s consider a Learning Management System LMS that needs to manage different types of courses such as online courses in person courses and hybrid courses Each course type has its own set of properties and behavior and we want to be able to create multiple instances of each course type Here s an example of how we can use the Registry pattern to manage the different course types Define a base Course class that defines the common properties and behavior of all course types class Course name string description string constructor name string description string this name name this description description enroll student Student enroll the student in the course cancelEnrollment student Student cancel the student s enrollment in the course Define a subclass for each course type and add any additional properties or behavior specific to that course type class OnlineCourse extends Course url string constructor name string description string url string super name description this url url start void start the online course class InPersonCourse extends Course location string constructor name string description string location string super name description this location location schedule void schedule the in person course class HybridCourse extends Course url string location string constructor name string description string url string location string super name description this url url this location location start void start the online portion of the hybrid course schedule void schedule the in person portion of the hybrid course Create a CourseRegistry object that will store instances of each course type interface CourseConstructor new args any any class CourseRegistry private courses key string CourseConstructor registerCourse courseType string constructor CourseConstructor void this courses courseType constructor createCourse courseType string args any any const CourseConstructor this courses courseType if CourseConstructor throw new Error Course type courseType not registered return new CourseConstructor args Register each course type with the CourseRegistry const courseRegistry new CourseRegistry courseRegistry registerCourse online OnlineCourse courseRegistry registerCourse in person InPersonCourse courseRegistry registerCourse hybrid HybridCourse Create instances of each course type using the CourseRegistry const onlineCourse courseRegistry createCourse online Introduction to JavaScript Learn JavaScript online const inPersonCourse courseRegistry createCourse in person Advanced React Learn advanced React techniques in person New York const hybridCourse courseRegistry createCourse hybrid Full stack Web Development Learn full stack web development San Francisco Benefits of using the Registry patternCentralized management of object creation The Registry pattern provides a centralized location for managing and creating instances of objects which can simplify object creation and management Flexibility and extensibility By using the Registry pattern you can add new types of objects to the system without modifying existing code making the system more flexible and extensible Improved performance The Registry pattern can improve performance by allowing the system to reuse existing objects rather than creating new ones each time they are needed Easy access to objects The Registry pattern provides a simple way to access objects throughout the system making it easy to share objects between different parts of the system Demerits of using the Registry patternIncreased complexity The Registry pattern can introduce additional complexity to a system particularly if it is not implemented properly or is used excessively Dependencies The Registry pattern can introduce dependencies between objects and the Registry which can make it more difficult to test and maintain the system Potential for naming collisions The Registry pattern relies on unique names for objects so there is a risk of naming collisions if multiple objects have the same name Potential for misuse The Registry pattern can be misused if it is not implemented properly leading to issues such as memory leaks poor performance and difficult to maintain code Overall the Registry pattern can be a useful tool in certain situations particularly when managing multiple instances of related objects However like any design pattern it should be used judiciously and with careful consideration of its potential benefits and drawbacks 2023-04-07 11:14:42
Apple AppleInsider - Frontpage News Jabra Elite 4 review: Average wireless earbuds at an okay price https://appleinsider.com/articles/23/04/07/jabra-elite-4-review-average-wireless-earbuds-at-an-okay-price?utm_medium=rss Jabra Elite review Average wireless earbuds at an okay priceJudged independently the Elite earbuds the newest member of Jabra s wireless lineup are perfectly fine But when compared to other personal audio options they start to look less remarkable Jabra Elite The Elite comes about a year after the Elite Active and finds itself in a crowded market against the likes of JLab Anker Soundcore OnePlus and more Read more 2023-04-07 11:21:56
海外TECH Engadget Samsung warns of lower profits amid falling demand for memory chips https://www.engadget.com/samsung-warns-of-lower-profits-amid-falling-demand-for-memory-chips-113551159.html?src=rss Samsung warns of lower profits amid falling demand for memory chipsSamsung has warned of plummeting profits and plans to cut back on memory chip production in response to falling demand The Korea Herald has reported It expects to earn just billion won million for the first quarter of a drop of percent from the same period last year It blamed falling demand for memory chips a situation that could be a bad sign for the tech industry as a whole nbsp quot We re adjusting to lower memory production to a meaningful level in addition to optimizing line operations that are already underway Samsung said in a statement It added that it would continue to invest in clean room infrastructure and expand R amp D spending as it sees improved memory chip demand in the mid to long term nbsp Although it trails Taiwan s TSMC in other areas Samsung is the global leader in DRAM and NAND flash memory chip production with and percent shares respectively Such chips are used in consumer devices of all kinds ranging from smartwatches to mobile phones and laptops The oversupply of memory chips is therefore a sign that demand for such products has fallen significantly due to an ongoing global economic slowdown nbsp The slowdown comes just a short time after one of the biggest tech industry booms of all time powered by the COVID pandemic Since late in however memory prices have dropped through the floor with DRAM and NAND prices down by and percent in just the last quarter alone One bright spot for Samsung has been sales of its new Galaxy S smartphone which helped bolster profits the company said It will reveal more details in its earnings report set to drop at the end of April nbsp This article originally appeared on Engadget at 2023-04-07 11:35:51
海外ニュース Japan Times latest articles Haruhiko Kuroda less dovish as he departs BOJ after decade of massive stimulus https://www.japantimes.co.jp/news/2023/04/07/business/kuroda-boj-farewell-dovish/ Haruhiko Kuroda less dovish as he departs BOJ after decade of massive stimulusThe BOJ s failure to change public expectations raises a lot of questions about the effectiveness of unconventional monetary policy 2023-04-07 20:11:45
海外ニュース Japan Times latest articles Sam Kerr hopes Women’s World Cup has lasting impact in Australia https://www.japantimes.co.jp/sports/2023/04/07/soccer/womens-world-cup/sam-kerr-australia-legacy/ Sam Kerr hopes Women s World Cup has lasting impact in AustraliaStriker Sam Kerr said the Matildas can create a lasting legacy for women s soccer in Australia when they co host this year s Women s World Cup in 2023-04-07 20:00:57
ニュース BBC News - Home SNP auditors quit after Peter Murrell police investigation https://www.bbc.co.uk/news/uk-scotland-65212357?at_medium=RSS&at_campaign=KARANGA investigationthe 2023-04-07 11:47:06
ニュース BBC News - Home Beckton blaze: Boy, 16, arrested after girl dies in flat fire https://www.bbc.co.uk/news/uk-england-london-65212040?at_medium=RSS&at_campaign=KARANGA london 2023-04-07 11:51:42
ニュース BBC News - Home Israel strikes Lebanon and Gaza after major rocket attack https://www.bbc.co.uk/news/world-middle-east-65210045?at_medium=RSS&at_campaign=KARANGA lebanon 2023-04-07 11:48:44
ニュース BBC News - Home Easter travel: Millions setting off on getaway as delays likely https://www.bbc.co.uk/news/uk-65206317?at_medium=RSS&at_campaign=KARANGA dover 2023-04-07 11:23:12

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)