Is there a way to have multiple asset banks? - aframe

I am trying to load in a bunch of 360 videos for a video tour. Being that they are large in size, I want just the first video to load, and as the user passes through door ways load in more of the assets as needed.

Just set material.src or src when you want to load the next video.
el.setAttribute('material', 'src', videoUrl);

Related

Dynamically update a youtube playlist on a website

OK I'm trying to develop a website that includes a youtube playlist. Later it should be possible for every person (in my local network) who visits the website to add songs to this playlist. I will use the youtube-api and probable php or python for this.
Now I've included the playlist via an <iframe> tag and stumbled across a big problem. If I now add more songs to this playlist (over youtube itself), they will of course only be added to the playlist on my website, when I reload the complete website. And if I just reload the div with the <iframe> for example, the problem is that the playlist starts all over again at the first song.
Is there a way I can dynamically update the playlist on my website? So that the playlist does not start again from the beginning, the current playing remains and new added songs are actually added "live" to the playlist?
Here the <iframe> tag if it helps:
<iframe id="playlist" src="https://www.youtube.com/embed/videoseries?list=PLmdXGEzOwfzb0fq7S2iP-t4i7x19R1ZN2"
frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
A way I suggest is:
(Before updating the div which contains the iframe), you need to get both the current playing video and the current time of the playing video.1
(Once you had added the video to the playlist and get the values I mentioned in the previous lines), update the div element (by modifying the src value of your iframe).
A example could be like this:
You have a playlist which id is: PLmdXGEzOwfzb0fq7S2iP-t4i7x19R1ZN2.
The current playing video is: 51iquRYKPbs
When you right-click on the playing video 51iquRYKPbs you'll get the Copy URL video at current time option.
Once selected the Copy URL video at current time option, you'lll get a URL like this:
youtu.be/51iquRYKPbs?list=PLmdXGEzOwfzb0fq7S2iP-t4i7x19R1ZN2&t=80
Check the highlighted values - you'll need them for reload your iframe.
Your current iframe src value is as follows:
https://www.youtube.com/embed/videoseries?list=PLmdXGEzOwfzb0fq7S2iP-t4i7x19R1ZN2
(No modifications yet).
For reload the iframe with the applied changes, set your iframe src as follows:
https://www.youtube.com/embed/51iquRYKPbs?list=PLZCHH_4VqpRhMW1K9I1hbgBRmmlWdyK3k&autoplay=1&start=80
(Once you change the src value of your iframe, it will reload with the changes made and it will continue playing the video in the specified time).
The changes made to the src value are explained next:
Set the videoId value of the video which was playing (before complete the reload).
Set the start value of the video for continue playing at the specified time.
the autoplay=1 is needed for play the video at the specified time.
1 About how get the current playing video and the current time of the playing video is a complete new question and it will depend in which language you're handling all the YouTube stuff in your website - (since you mentioned in your question that you will use php or python).

Why mp3 file cannot be autoplayed in Qualtrics?

I inserted an mp3 file into Qualtrics from my library following the instruction here: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/rich-content-editor/insert-media/
I would have several pages and one mp3 per page, so I tried to make the mp3 file automatically played, and people don't need to click "play" on every page. I followed the instruction here: https://www.kent.ac.uk/psychology/downloads/Qualtrics-MP3-FAQ.pdf
As you can see in the image attached, I have set "autostart = true", however, when I check in the preview mode, the mp3 file is still not automatically played.
Do you have any ideas about which step could go wrong? Or is there any alternative way to make the mp3 file autoplayed in Qualtrics? Thanks in advance!

Firebase cloud function image resize

Following the example here https://github.com/firebase/functions-samples/blob/master/generate-thumbnail/functions/index.js
How do I notify the client when the image is processed?
I want to have a form upload a photo and resize it to multiple sizes. How do I let the client know when the the cloud function is finished?
I'm using firebase/storage to upload the image client side, then I have a could function listening for files to be uploaded functions.storage.object().onFinalize and processing/resize the images. Is there a callback to the client when the cloud function is finished or to I need to setup pub/sub?
Your ultimate new images (the small ones - or whatever they are), would have some URL, let's say storageCompany.net/123123123123.jpg
So in your realtime Firebase, you will have some location that gives these URLs.
So maybe something like ..
user/NNNN/photos/thumbnails
so to be clear, you might have
user/NNNN/photos/thumbnails/726376733677.jpg
user/NNNN/photos/thumbnails/808080188180.jpg
user/NNNN/photos/thumbnails/363636636636.jpg
and now you're adding
user/NNNN/photos/thumbnails/123123123123.jpg
So indeed, your apps would simply watch for new items (ie, strings - the URLs) appearing in that location!
Just to be clear, let's say you have an ios or droid app that shows "any sort of images", and this is a Firebase project.
So, in your example is "thumbnail images" which are "created by a server".
But it just doesn't matter what sort of images you are showing.
In a
Firebase project, which
"Shows images"
The basic idea is simply what I explain above - you just have, one way or another, a Firebase location which has "the URLs of the images"
It's that simple!
Once the image is "ready" - no matter how that happens - upload, image being generated by 3D software .. whatever ..
That's how you make a Firebase project "with images". iOS, droid or www.
Of course there are many variations. In this example ..
we have a big folder with many "images". each "image" has many fields, including various actual image URLs (thumbnails, big thumbnails, videos, etc etc)
Precisely as you ask, the "thumbnail" (say) URL only appears when that image has been created and upload to some storage URL!
Enjoy
You will have to arrange for an exchange point between the client and your function. Typically, that will be some known location in the database where the function will write the result, and the client can listen for changes to know when the work is complete.
The example you're using will need to be modified to allow the client and server to agree on a unique location ahead of time.
There are two problems with Firebase image resizing - (1) it's tricky to notify the client once the image resizing is complete, and (2) you never know which exact size the client-side app may need (assuming you're building a responsive app).
These two issues can be solved by using a dynamic image resizing approach. The client app can upload images directly to Google Storage (via signed URLs and PUT requests), once the upload is complete it can request the resized image(s) right away. For example:
https://i.kriasoft.com/sample.jpg - original image
https://i.kriasoft.com/w_200,h_100/sample.jpg - dynamically resized image
The resized images can be cached in both the Google Storage bucket and at CDN.
$ npm install image-resizing --save
const { createHandler } = require("image-resizing");
module.exports.img = createHandler({
// Where the source images are located.
// E.g. gs://s.example.com/image.jpg
sourceBucket: "s.example.com",
// Where the transformed images need to be stored.
// E.g. gs://c.example.com/w_80,h_60/image.jpg
cacheBucket: "c.example.com",
});
https://github.com/kriasoft/image-resizing

Liip ImagineBundle custom resize without caching

I am using Liip ImagineBundle for managing the pictures in an auction listings project. The setup is as follows - when an auction listing is being created I am using Plupload to upload the picture set (with AJAX prior to persisting the auction). The pictures are uploaded into /pictures/temp folder with a temporary hash name. Upon persisting the entity, a Doctrine Subscriber renames the uploads in the temporary folder to use a format:
{AUCTION-ID}-{SIZE}-{TIMESTAMP}.{EXTENSION}
where the size is the version of the image - XL, large, medium, etc. and based on the timestamp creates a subfolder as:
/pictures/{YEAR}/{MONTH}/{DAY}/{PICTURE}
This allows for preventing millions of pictures to end up in a single folder and slow the file system. I am using a custom file loader and cache manager to resolve the pictures based on the timestamp. It all works perfectly fine but I have a request to display the uploaded pictures in a preview while doing the Plupload. The problem is in the resizing and caching with the ImagineBundle. What I would like to achieve is have the uploaded picture (the {HASH}.jpg in /pictures/temp) be resized to a specific size and at the same time a thumbnail to be generated off that as {HASH}-thumb.jpg. I know I can make it with another file loader and a cache manager but I was wondering whether it is possible to done via the bundle in some other way which is simpler as both these files are temporary ones and will be deleted upon the creation of the auction.

How to change the background image IBM mobile anywhere app in login page

I am looking to re-design the Login page. I need to add a new background image. Let me know where should I be copying this image into the project and where should I be specifying the image reference. I see the change made directly into Login.html are not reflecting in the output.
There are two logos in Maximo Anywhere, ibmLogoDark.png and ibmLogoLight.png (for the light and dark backgounds). You will need to obtain suitable replacement (transparent backgound) logo gifs or png files from your customer, of an equivalent size.
The IBM logo image files are in:
\MaximoAnywhere\apps\WorkExecution\common\js\platform\ui\control\images\mdpi
and also in:
\MaximoAnywhere\apps\WorkExecution\common\idx\mobile\themes\common\idx\images
So that is where I put copies of my customers replacement logos.
You'll want to give them different names from the IBM logos just so they don't get overwritten so easily. There are 4 CSS files you need to update to the new name:
about.css, launch.css and login.css in:
\MaximoAnywhere\apps\WorkExecution\common\idx\mobile\themes\common\idx
and mdpi.css in
\MaximoAnywhere\apps\WorkExecution\common\js\platform\ui\control\css
There are also two app.xml files you need to update to point to the new names. One in each of:
\MaximoAnywhere\apps\WorkExecution\platform-artifacts\dialog
and
\MaximoAnywhere\apps\WorkExecution\platform-artifacts\login
Then rebuild and you're done. Oh, and make sure you clear your browser cache (or use incognito mode) to test.

Resources