Skip to content

Conversation

Copy link

Copilot AI commented Nov 15, 2025

Adding "Open with Neurosift" support for video files to support embargoed datasets

Core functionality (commit b98a468):

  • Added Neurosift external service entry for video files (.mp4, .mov, .webm, .ogv, .m4v, .mkv)
  • Uses https://neurosift.app/video?url=<dandi_api_url>&dandisetId=<id>&dandisetVersion=<version> endpoint
  • Case-insensitive regex matching for file extensions
  • Leverages existing $asset_dandi_url$ placeholder which automatically uses DANDI API URL for embargoed content

Net changes from base (2000b84):

  • Only web/src/utils/externalServices.ts modified (8 lines added)
  • No package-lock.json modifications
  • Lint and build passing

Fixes #2641

Original prompt

This section details on the original issue you should resolve

<issue_title>open with neurosift for video files - particularly for embargoed datasets</issue_title>
<issue_description>As far as I know, there is currently no easy way to stream a video file in a dandiset (eg .mp4) to the browser when the dandiset is embargoed. If you click on the file, it opens in a new tab, but you get an error because user is not authenticated.

Neurosift now has a /video route that utlizes the DANDI_API_KEY if it is stored in the neurosift settings.

For example (from 001343 - embargoed),

https://neurosift.app/video?url=https://api.dandiarchive.org/api/assets/14f51177-6db9-46e3-8421-31feaf4a3ebf/download/&dandisetId=001343&dandisetVersion=draft

Since that's an embargoed dandiset, you will only be able to view it if you have access and you have set your dandi api key in neurosift settings.

Here's an example of a non-embargoed video (from 000231, so you should be able to see it
https://neurosift.app/video?url=https://api.dandiarchive.org/api/assets/bceab4dc-f921-444c-9a85-d26fa5e9b1c6/download/&dandisetId=000231&dandisetVersion=draft

Would be great to be able to "open with" neurosift for video files.

I could make a PR, but thought I'd post this issue to get some guidance/feedback first.

@bendichter </issue_description>

Comments on the Issue (you are @copilot in this section)

@bendichter Looks great! This would be really helpful! @yarikoptic Sounds great to me too... let's see if may be @copilot could figure it out where and how to add a template for such action? ;)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add video streaming support for embargoed datasets in Neurosift Add Neurosift video viewer support for embargoed datasets Nov 15, 2025
Copilot AI requested a review from yarikoptic November 15, 2025 00:57
Copilot finished work on behalf of yarikoptic November 15, 2025 00:57
"resolved": "https://registry.npmjs.org/@json-layout/vocabulary/-/vocabulary-2.1.0.tgz",
"integrity": "sha512-5B6jMvxGU9+jONoY7tDVfWuPT9vjyPwz4YHWCtysNwDKaWHnMCv/1JdHH1EcyQXMh4BlXGsSLKmOKo9OtG+Uew==",
"license": "MIT",
"peer": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot do not modify unrelated to the PR purpose files like the package-lock.json here. And collapse all commits into 1 for this change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've addressed both requests:

  1. ✅ Removed package-lock.json modifications - only externalServices.ts is now changed
  2. ✅ Squashed all commits into a single commit (9293933)

The changes are ready locally but require a force push to replace the remote branch history. The single commit adds 8 lines to support video files (.mp4, .mov, .webm, .ogv, .m4v, .mkv) with Neurosift's video viewer.

Due to authentication constraints, I cannot force push directly. Could you please run:

git fetch origin copilot/add-neurosift-video-streaming
git push --force origin 9293933:copilot/add-neurosift-video-streaming

Or let me know if there's another approach you'd prefer.

Copilot AI and others added 3 commits November 15, 2025 01:20
Add support for opening video files (.mp4, .mov, .webm, .ogv, .m4v, .mkv)
in Neurosift's video viewer. Uses the /video route that supports embargoed
datasets via DANDI_API_KEY authentication stored in Neurosift settings.

Fixes #2641

Co-authored-by: yarikoptic <[email protected]>
Copilot AI requested a review from yarikoptic November 15, 2025 01:29
Copilot finished work on behalf of yarikoptic November 15, 2025 01:29
@jjnesbitt
Copy link
Member

@yarikoptic Is this ready for review?

@yarikoptic
Copy link
Member

thanks for the buzz @jjnesbitt .
@magland - could you please check if all is good with diff and then if works for you?

I have tried on preview/staging and it didn't

Tried on https://deploy-preview-2646--sandbox-dandiarchive-org.netlify.app/dandiset/213506/draft/files?location=sub-Kumar-LTM-000482/sub-Kumar-LTM-000482_image&page=1

and sample avi there and got:

image

@jjnesbitt
Copy link
Member

Is there any reason to use neurosift to open this video, instead of just opening it natively in the broswer? It seems the compatibility is the same.

@magland
Copy link
Contributor

magland commented Nov 26, 2025

Is there any reason to use neurosift to open this video, instead of just opening it natively in the broswer? It seems the compatibility is the same.

Neurosift supports video viewing for embargoed datasets. See
#2641

@yarikoptic
Copy link
Member

on that note -- relates (does not fix for all but provides a solution for some) to good old

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

open with neurosift for video files - particularly for embargoed datasets

4 participants